Skip to main content
Glama
tanmay4l

Futarchy MCP Server

by tanmay4l

getDao

Retrieve a specific DAO by its ID from the Futarchy protocol on Solana to access governance information and manage proposals.

Instructions

Get a specific DAO by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daoIdYesThe ID of the DAO to retrieve

Implementation Reference

  • MCP tool handler implementation for 'getDao'. Validates input, fetches DAO data using apiClient, handles success/error responses, and returns markdown-compatible content.
    server.tool(
      "getDao",
      "Get a specific DAO by ID",
      {
        daoId: z.string().describe("The ID of the DAO to retrieve"),
      },
      async ({ daoId }) => {
        try {
          const response = await apiClient.getDao(daoId);
          
          if (!response.success) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: response.error || 'Unknown error',
                },
              ],
              isError: true,
            };
          }
          
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(response.data, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error fetching DAO: ${error.message || 'Unknown error'}`,
              },
            ],
            isError: true,
          };
        }
      }
  • Core helper method in FutarchyApiClient that performs HTTP GET request to backend API endpoint `/daos/{daoId}` to retrieve specific DAO information.
    async getDao(daoId: string): Promise<Response> {
      try {
        const response = await fetch(`${this.baseUrl}/daos/${daoId}`);
        if (!response.ok) {
          throw new Error(`HTTP error! Status: ${response.status}`);
        }
        const data = await response.json();
        
        return {
          success: true,
          data: data.dao
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message || `Failed to fetch DAO with ID: ${daoId}`
        };
      }
    }
  • Zod schema defining input parameters for getDao tool (matches inline schema in handler).
    export const GetDaoParamsSchema = z.object({
      daoId: z.string().describe("The ID of the DAO to retrieve"),
    });
  • TypeScript type and Zod schema for DAO data structure returned by the tool.
    export const DaoSchema = z.object({
      address: z.string(),
      tokenMint: z.string(),
      usdcMint: z.string(),
      // Add other DAO fields as needed
    });
    
    export type Dao = z.infer<typeof DaoSchema>;
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 states a read operation ('Get') but doesn't disclose behavioral traits such as error handling, authentication needs, rate limits, or what happens if the DAO ID is invalid. This leaves significant gaps for a tool with no annotation coverage.

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 a single, efficient sentence with zero waste, front-loading the core purpose. It's appropriately sized for a simple retrieval tool, earning full marks for conciseness.

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 simple input schema, the description is incomplete. It doesn't explain return values, error cases, or behavioral context, which are crucial for a tool with zero structured coverage beyond the input parameter.

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%, so the schema already documents the single parameter 'daoId' fully. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, meeting the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('a specific DAO by ID'), making the purpose understandable. However, it doesn't differentiate from sibling 'getDaos' which likely retrieves multiple DAOs, missing explicit sibling distinction that would warrant a 5.

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 alternatives like 'getDaos' for listing multiple DAOs or other tools for proposal-related operations. The description implies usage for retrieving a single DAO but lacks explicit when/when-not instructions or named alternatives.

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

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/tanmay4l/FutarchyMCPServer'

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