Skip to main content
Glama

get_proposal_details

Retrieve comprehensive details for a specific DAO governance proposal by providing its unique ID. Enables real-time tracking and analysis of decentralized decision-making processes.

Instructions

Fetch detailed information for a specific proposal. Parameters: proposal_id (str): The unique identifier of the proposal. Returns: A formatted string containing detailed information about the proposal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proposal_idYes

Implementation Reference

  • main.py:109-164 (handler)
    The handler function for the 'get_proposal_details' tool, decorated with @mcp.tool() for automatic registration. It queries the Snapshot GraphQL API for proposal details using the provided proposal_id, formats the response with timestamps converted via ts2str helper, and returns a detailed string summary.
    @mcp.tool() async def get_proposal_details(proposal_id: str, ctx: Context) -> str: """ Fetch detailed information for a specific proposal. Parameters: proposal_id (str): The unique identifier of the proposal. Returns: A formatted string containing detailed information about the proposal. """ query = """ query Proposal($id: String!) { proposal(id: $id) { id title body state created end choices scores votes } } """ async with httpx.AsyncClient() as client: try: response = await client.post( SNAPSHOT_API, json={"query": query, "variables": {"id": proposal_id}} ) response.raise_for_status() data = response.json() proposal = data.get("data", {}).get("proposal") if not proposal: return "Proposal not found" created_str = ts2str(proposal['created']) end_str = ts2str(proposal['end']) return ( f"Proposal ID: {proposal['id']}\n" f"Title: {proposal['title']}\n" f"State: {proposal['state']}\n" f"Created: {created_str}\n" f"End: {end_str}\n" f"Choices: {', '.join(proposal['choices'])}\n" f"Scores: {proposal['scores']}\n" f"Votes: {proposal['votes']}\n" "------\n" f"{proposal['body']}" ) except Exception as e: return f"Error: {str(e)}"

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/kukapay/dao-proposals-mcp'

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