hyperd.governance.summarize
Summarize a DAO governance proposal from Snapshot or Tally. Get structured impact analysis including who benefits, who pays, and recommended position.
Instructions
Summarize a DAO governance proposal (Snapshot or Tally URL). Returns structured impact analysis: who benefits, who pays, recommended position. LLM-summarized. Costs $0.10 in USDC.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| proposal_url | Yes | Snapshot or Tally proposal URL |
Implementation Reference
- src/server.ts:336-344 (registration)Registration of the 'hyperd.governance.summarize' tool via server.tool() with name, description, input schema (proposal_url), and handler.
// hyperd.governance.summarize — DAO proposal LLM summary ($0.10) server.tool( "hyperd.governance.summarize", "Summarize a DAO governance proposal (Snapshot or Tally URL). Returns structured impact analysis: who benefits, who pays, recommended position. LLM-summarized. Costs $0.10 in USDC.", { proposal_url: z.string().describe("Snapshot or Tally proposal URL"), }, async (args) => asText(await paidGet("/api/governance/summarize", args)), ); - src/server.ts:343-343 (handler)Handler function for the tool: calls paidGet('/api/governance/summarize') passing the args (proposal_url query param), then wraps result with asText().
async (args) => asText(await paidGet("/api/governance/summarize", args)), - src/server.ts:340-341 (schema)Input schema: single required string parameter 'proposal_url' described as 'Snapshot or Tally proposal URL'.
{ proposal_url: z.string().describe("Snapshot or Tally proposal URL"), - src/server.ts:79-92 (helper)Helper function paidGet() that constructs the URL, appends query params from args, and initiates the paid x402 request. Used by the tool handler.
async function paidGet( path: string, query: Record<string, string | number | boolean | undefined>, ): Promise<unknown> { if (!httpClient) { throw new Error(WALLET_NOT_CONFIGURED_MSG); } const url = new URL(`${API_BASE}${path}`); for (const [k, v] of Object.entries(query)) { if (v !== undefined && v !== "" && v !== null) url.searchParams.set(k, String(v)); } return paidRequest("GET", url, undefined); } - src/server.ts:155-157 (helper)Helper function asText() that wraps JSON response into MCP content block format.
function asText(data: unknown) { return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; }