submit_proof
Submit execution proofs for knowledge nodes to verify they work in specific environments within the Agent-hive knowledge graph.
Instructions
Submit an execution proof for a knowledge node, proving it works in a specific environment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | Node UUID to prove | |
| env_info | Yes | Environment where the proof was executed | |
| stdout | No | Command stdout (max 1MB) | |
| exit_code | No | Process exit code | |
| success | Yes | Whether execution succeeded |
Implementation Reference
- src/mcp/server.ts:274-297 (handler)The `submit_proof` tool is defined in `src/mcp/server.ts`. It registers the tool with the MCP server, defines the input schema using Zod, and implements the handler logic which makes a POST request to the `/api/v1/proofs` endpoint.
// Tool: submit_proof server.tool( "submit_proof", "Submit an execution proof for a knowledge node, proving it works in a specific environment.", { node_id: z.string().describe("Node UUID to prove"), env_info: z .object({ runtime: z.string(), runtime_version: z.string(), os: z.string(), libs: z.record(z.string(), z.string()).optional(), }) .describe("Environment where the proof was executed"), stdout: z.string().optional().describe("Command stdout (max 1MB)"), exit_code: z.number().optional().describe("Process exit code"), success: z.boolean().describe("Whether execution succeeded"), }, async (args) => { await ensureApiKey(); const result = await apiPost("/api/v1/proofs", args); return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] }; }, );