Skip to main content
Glama

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
NameRequiredDescriptionDefault
node_idYesNode UUID to prove
env_infoYesEnvironment where the proof was executed
stdoutNoCommand stdout (max 1MB)
exit_codeNoProcess exit code
successYesWhether execution succeeded

Implementation Reference

  • 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) }] };
      },
    );

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/kelvinyuefanli/agent-hive'

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