Skip to main content
Glama

getDao

Retrieve a specific DAO by its ID using the Futarchy MCP Server on Solana, simplifying DAO management and integration with the Futarchy protocol.

Instructions

Get a specific DAO by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daoIdYesThe ID of the DAO to retrieve

Implementation Reference

  • Handler function that executes the getDao tool: calls apiClient.getDao(daoId), handles response or error, returns formatted MCP content.
    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, }; } }
  • MCP server.tool registration for the 'getDao' tool, specifying name, description, input schema (daoId), and inline handler.
    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, }; } } );
  • Zod schema defining input parameters for getDao tool (matches inline schema used in registration).
    export const GetDaoParamsSchema = z.object({ daoId: z.string().describe("The ID of the DAO to retrieve"), });
  • FutarchyApiClient.getDao method: performs HTTP GET to backend /daos/{daoId}, parses response into standardized Response format.
    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}` }; } }

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

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