Skip to main content
Glama

get_governance_proposals

Retrieve active governance proposals from the Penumbra blockchain to stay informed about ongoing community decisions and voting processes.

Instructions

Get active governance proposals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter proposals by statusactive

Implementation Reference

  • The handler function that executes the get_governance_proposals tool logic. It returns mock data for governance proposals filtered by status, with error handling.
    private async getGovernanceProposals(status: string) { try { // TODO: Implement actual governance proposals query return { content: [ { type: 'text', text: JSON.stringify({ proposals: [ { id: "1", title: "Example Proposal", status: "active", votingEndTime: new Date(Date.now() + CONFIG.governance.votingPeriod).toISOString(), minDeposit: CONFIG.governance.minDepositAmount, yesVotes: "750000", noVotes: "250000" } ] }, null, 2), }, ], }; } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error fetching governance proposals: ${errorMessage}`, }, ], isError: true, }; } }
  • src/index.ts:136-151 (registration)
    Registration of the get_governance_proposals tool in the MCP server tools list, including name, description, and input schema.
    { name: 'get_governance_proposals', description: 'Get active governance proposals', inputSchema: { type: 'object', properties: { status: { type: 'string', enum: ['active', 'completed', 'all'], description: 'Filter proposals by status', default: 'active' } }, required: [], }, }
  • Input schema definition for the get_governance_proposals tool, specifying the optional 'status' parameter with enum values.
    inputSchema: { type: 'object', properties: { status: { type: 'string', enum: ['active', 'completed', 'all'], description: 'Filter proposals by status', default: 'active' } }, required: [], },
  • Dispatcher case in the CallToolRequestHandler that invokes the getGovernanceProposals handler with parsed status argument.
    case 'get_governance_proposals': return await this.getGovernanceProposals( (request.params.arguments?.status as string) || 'active' );

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/bmorphism/penumbra-mcp'

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