Skip to main content
Glama

list_proposals

Retrieve all proposals for a specific DAO using the MCP SNS Server, enabling users to stay informed, manage governance tasks, and participate in decision-making processes effectively.

Instructions

List all proposals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daoNameYesDAO name

Implementation Reference

  • src/index.ts:58-71 (registration)
    Registration of the 'list_proposals' tool, including name, description, and input schema (requires daoName).
    {
      name: "list_proposals",
      description: "List all proposals",
      inputSchema: {
        type: "object",
        properties: {
          daoName: {
            type: "string",
            description: "DAO name",
          },
        },
        required: ["daoName"],
      },
    },
  • Main handler for 'list_proposals' tool: validates daoName, resolves canister ID via searchDAOs, calls snsClient.listProposals, and returns result or error message.
    case "list_proposals": {
      const daoName = String(request.params.arguments?.daoName);
      if (!daoName) {
        throw new Error("daoName is required");
      }
      let canister_id = searchDAOs(daoName);
    
      if (canister_id) {
        const proposals = await snsClient.listProposals(canister_id);
    
        return proposals;
      }
    
      return {
        content: [
          {
            type: "text",
            text: `No proposals found for DAO: ${daoName}`,
          },
        ],
      };
    }
  • Helper function listProposals in SnsClient: fetches proposals using SNS wrapper with optional limit (default 100), formats as text content or error.
    async listProposals(canisterId: string, limit: number = 100) {
      try {
        const snsWrapper = await this.getSnsWrapper(canisterId);
    
        // Fetch proposals from the SNS
        const listProposalsRes = await snsWrapper.listProposals({
          limit,
        });
    
        // Get the proposal list
        const proposalList = listProposalsRes.proposals;
    
        // Return the proposals as a formatted JSON string
        return {
          content: [
            {
              type: "text",
              text: `proposals: ${safeParseJSON(proposalList)}`,
            },
          ],
        };
      } catch (error) {
        // Return an error message if the fetch fails
        return {
          content: [
            {
              type: "text",
              text: `Error fetching proposals: ${
                error instanceof Error ? error.message : "Unknown error"
              }`,
            },
          ],
        };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires authentication, rate limits, pagination, or what the output format might be. The description is minimal and adds no behavioral context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loaded and zero waste. It efficiently states the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a sibling tool, the description is incomplete. It doesn't explain the relationship to 'list_votable_neurons', output details, or behavioral aspects. For a tool with one parameter and no structured support, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'daoName' documented as 'DAO name'. The description doesn't add any meaning beyond this, such as explaining what a DAO is or how the parameter affects the listing. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List all proposals' clearly states the action (list) and resource (proposals), but it's vague about scope and doesn't differentiate from the sibling tool 'list_votable_neurons'. It doesn't specify whether this lists proposals across all DAOs or just for a specific DAO, which the parameter suggests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling 'list_votable_neurons'. The description doesn't mention prerequisites, alternatives, or context for usage, leaving the agent to infer based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baolongt/sns-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server