Skip to main content
Glama

get_proposal_details

Fetch detailed information about a specific DAO governance proposal using its unique identifier to analyze decentralized decision-making.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:109-164 (handler)
    The handler function decorated with @mcp.tool() that implements the core logic for fetching and formatting detailed information about a Snapshot proposal using GraphQL query to the Snapshot API.
    @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)}"
  • main.py:13-15 (helper)
    Helper utility function to convert Unix timestamps to readable datetime strings, used within get_proposal_details for formatting created and end times.
    def ts2str(ts: int) -> str:
      dt = datetime.fromtimestamp(ts)
      return dt.strftime("%Y-%m-%d %H:%M:%S")
  • main.py:109-109 (registration)
    The @mcp.tool() decorator registers the get_proposal_details function as an MCP tool.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it 'fetches' information, implying a read-only operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, error handling, or what happens if the proposal_id is invalid. The description lacks crucial context for safe and effective use.

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 appropriately sized and front-loaded with the main purpose, followed by clear sections for parameters and returns. Every sentence earns its place without redundancy, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter) and the presence of an output schema (which handles return values), the description is somewhat complete but lacks behavioral details. Without annotations, it should provide more context on usage constraints and error cases to be fully adequate.

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 description adds meaning by specifying that 'proposal_id' is a 'unique identifier', which clarifies its purpose beyond the schema's basic 'string' type. With 0% schema description coverage and only one parameter, this compensates well, though it doesn't detail format or constraints.

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 verb ('Fetch') and resource ('detailed information for a specific proposal'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_proposals' or 'list_spaces', which likely serve different purposes (listing vs. fetching details).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when detailed information for a specific proposal is needed, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'list_proposals' or 'list_spaces'. No exclusions or prerequisites are mentioned.

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

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