Skip to main content
Glama

governance_monitor

Monitor active governance proposals for Hedera tokens or DAOs to track voting deadlines and current vote tallies.

Instructions

Monitor active governance proposals for a Hedera token or DAO. Returns open proposals, voting deadlines, and current vote tallies. Provide topic_id for best results — without it, only token metadata is returned. Costs 0.1 HBAR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesYour HederaIntel API key
token_idYesHedera token ID to monitor governance for (e.g. 0.0.123456)
topic_idNoOptional HCS topic ID used for governance messages

Implementation Reference

  • The handler logic for 'governance_monitor' which processes API requests, charges for the tool, fetches token/proposal info from Hedera Mirror Node, and calculates summaries.
    if (name === "governance_monitor") {
      const payment = chargeForTool("governance_monitor", args.api_key);
      const base = getMirrorNodeBase();
    
      // Fetch token info
      const tokenRes = await axios.get(`${base}/api/v1/tokens/${args.token_id}`);
      const token = tokenRes.data;
    
      // Fetch HCS messages if topic_id provided (look for governance messages)
      let proposals = [];
      if (args.topic_id) {
        const msgRes = await axios.get(
          `${base}/api/v1/topics/${args.topic_id}/messages?limit=100&order=desc`
        );
        const messages = msgRes.data.messages || [];
        for (const msg of messages) {
          try {
            const content = Buffer.from(msg.message, "base64").toString("utf-8");
            const parsed = JSON.parse(content);
            if (parsed.type === "proposal" || parsed.proposal_id) {
              proposals.push({
                proposal_id: parsed.proposal_id || msg.sequence_number,
                title: parsed.title || "Untitled Proposal",
                status: parsed.status || "active",
                created_at: msg.consensus_timestamp,
                deadline: parsed.deadline || null,
                yes_votes: parsed.yes_votes || 0,
                no_votes: parsed.no_votes || 0,
                abstain_votes: parsed.abstain_votes || 0,
              });
            }
          } catch (e) {
            continue;
          }
        }
      }
    
      // Fetch recent token transactions as proxy for governance activity
      const txRes = await axios.get(
        `${base}/api/v1/tokens/${args.token_id}/nfts?limit=5`
      ).catch(() => ({ data: {} }));
    
      const holderRes = await axios.get(
        `${base}/api/v1/tokens/${args.token_id}/balances?limit=10&order=desc`
      ).catch(() => ({ data: { balances: [] } }));
    
      const topHolders = (holderRes.data.balances || []).slice(0, 5).map(b => ({
        account: b.account,
        balance: b.balance,
      }));
    
      return {
        token_id: args.token_id,
        token_name: token.name || "Unknown",
        token_symbol: token.symbol || "?",
        total_supply: token.total_supply,
        treasury: token.treasury_account_id,
        governance_topic: args.topic_id || null,
        active_proposals: proposals.filter(p => p.status !== "closed").length,
        proposals,
        top_holders: topHolders,
        summary: proposals.length === 0
          ? "No governance proposals found on this topic. The token may use off-chain voting or no topic_id was provided."
          : `Found ${proposals.length} proposal(s). Pass a proposal_id to governance_analyze for deep analysis.`,
        payment,
        timestamp: new Date().toISOString(),
      };
    }
  • The schema definition and metadata (name, description, input parameters) for the 'governance_monitor' tool.
    export const GOVERNANCE_TOOL_DEFINITIONS = [
      {
        name: "governance_monitor",
        description: "Monitor active governance proposals for a Hedera token or DAO. Returns open proposals, voting deadlines, and current vote tallies. Provide topic_id for best results — without it, only token metadata is returned. Costs 0.2 HBAR.",
        inputSchema: {
          type: "object",
          properties: {
            token_id: { type: "string", description: "Hedera token ID to monitor governance for (e.g. 0.0.123456)" },
            topic_id: { type: "string", description: "Optional HCS topic ID used for governance messages" },
            api_key: { type: "string", description: "Your HederaIntel API key" },
          },
          required: ["token_id", "api_key"],
        },
      },
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively reveals key behavioral traits: the tool returns specific data types (proposals, deadlines, tallies), has conditional behavior based on topic_id presence, and discloses a cost ('Costs 0.1 HBAR'). It doesn't mention rate limits, authentication requirements beyond the api_key parameter, or error conditions, but provides substantial operational context.

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 efficiently structured in three sentences that each add value: purpose statement, parameter guidance, and cost disclosure. There's no wasted language, and the most critical information (purpose and topic_id impact) appears first.

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

Completeness4/5

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

For a tool with no annotations and no output schema, the description provides good coverage of what the tool does, how parameters affect behavior, and operational costs. It could be more complete by describing the return format in more detail or mentioning error cases, but given the 3-parameter complexity and 100% schema coverage, it's substantially informative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds some semantic context by explaining the functional impact of topic_id ('without it, only token metadata is returned'), but doesn't provide additional meaning for api_key or token_id beyond what's in the schema. This meets the baseline for high schema coverage.

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 tool's purpose: 'Monitor active governance proposals for a Hedera token or DAO' with specific outputs ('open proposals, voting deadlines, and current vote tallies'). It distinguishes from siblings like 'governance_analyze' by focusing on monitoring rather than analysis, but doesn't explicitly contrast with 'hcs_monitor' or 'token_monitor' which might have overlapping functions.

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

Usage Guidelines4/5

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

The description provides clear context for usage: 'Provide topic_id for best results — without it, only token metadata is returned.' This gives practical guidance on when to include the optional parameter. However, it doesn't explicitly state when to use this tool versus alternatives like 'governance_analyze' or 'hcs_monitor' from the sibling list.

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/mountainmystic/hederatoolbox'

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