Skip to main content
Glama
tanmay4l

Futarchy MCP Server

by tanmay4l

getDaos

Retrieve all DAOs from the Futarchy protocol on Solana to manage decentralized organizations and proposals.

Instructions

Get all DAOs from the Futarchy system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server tool registration including the handler function for 'getDaos'. The handler invokes apiClient.getDaos(), processes the response, and returns formatted JSON or error text.
    server.tool(
      "getDaos",
      "Get all DAOs from the Futarchy system",
      {},
      async () => {
        try {
          const response = await apiClient.getDaos();
          
          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 DAOs: ${error.message || 'Unknown error'}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • Core implementation of getDaos method in FutarchyApiClient. Performs HTTP GET to backend /daos endpoint and wraps response in standardized Response format.
    async getDaos(): Promise<Response> {
      try {
        const response = await fetch(`${this.baseUrl}/daos`);
        if (!response.ok) {
          throw new Error(`HTTP error! Status: ${response.status}`);
        }
        const data = await response.json();
        
        return {
          success: true,
          data: data.daos
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message || 'Failed to fetch DAOs'
        };
      }
    }
  • Zod schema defining input parameters for getDaos tool (empty object, no parameters required).
    export const GetDaosParamsSchema = z.object({});
  • Explicit registration of the 'getDaos' tool on the MCP server with name, description, input schema, and handler function.
    server.tool(
      "getDaos",
      "Get all DAOs from the Futarchy system",
      {},
      async () => {
        try {
          const response = await apiClient.getDaos();
          
          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 DAOs: ${error.message || 'Unknown error'}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
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 'Get all DAOs' but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination, format), or potential rate limits. The description is minimal and lacks critical operational context.

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. It's front-loaded with the core purpose and appropriately sized for a simple tool, making it easy to parse 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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'all DAOs' entails (e.g., scope, format, limitations) or provide context about the Futarchy system. For a tool with no structured support, more detail is needed to guide effective use.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details beyond the schema, but this is appropriate given the absence of parameters. A baseline of 4 is applied as it adequately handles the zero-parameter case.

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 action ('Get all DAOs') and resource ('from the Futarchy system'), providing a specific verb+resource combination. However, it doesn't differentiate from its sibling 'getDao' (singular), which presumably retrieves a single DAO, leaving some ambiguity about when to use each tool.

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?

The description provides no guidance on when to use this tool versus alternatives like 'getDao' (singular) or other sibling tools. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from 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

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