Skip to main content
Glama

getDaos

Access and retrieve all DAOs within the Futarchy protocol on Solana through this tool, enabling efficient management and interaction with decentralized organizations.

Instructions

Get all DAOs from the Futarchy system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler and registration for 'getDaos'. It calls the API client to fetch DAOs, handles success/error responses, and returns formatted text content.
    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, }; } } );
  • Zod schema for getDaos input parameters (empty object since no params required).
    export const GetDaosParamsSchema = z.object({});
  • The API client method getDaos() that performs an HTTP GET request to the backend API endpoint '/daos' and returns a standardized Response object.
    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' }; } }

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