Skip to main content
Glama
Frontier-Compute

Frontier-Compute/zcash-mcp

zcash_reputation_score

Look up an agent's ZAP1 reputation score combining bond data and policy compliance. Returns attestation count, violations, bonds, and compliant status.

Instructions

Fetch an agent's reputation from ZAP1. Combines bond data and policy compliance into a single object: attestation count, violations, bonds, and compliant flag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent identifier to look up

Implementation Reference

  • The registerReputationTool function that registers the 'zcash_reputation_score' tool with the MCP server. The handler fetches bond data and policy compliance from ZAP1 API for a given agent_id, then returns a JSON object with attestation_count, violations, bonds, and compliant fields.
    export function registerReputationTool(server: McpServer) {
      server.tool(
        "zcash_reputation_score",
        "Fetch an agent's reputation from ZAP1. Combines bond data and policy compliance into a single object: attestation count, violations, bonds, and compliant flag.",
        {
          agent_id: z.string().max(128).describe("Agent identifier to look up"),
        },
        async ({ agent_id }) => {
          try {
            const [bondRes, policyRes] = await Promise.all([
              fetch(`${ZAP1_API}/agent/${encodeURIComponent(agent_id)}/bond`, {
                signal: AbortSignal.timeout(API_TIMEOUT_MS),
              }),
              fetch(`${ZAP1_API}/agent/${encodeURIComponent(agent_id)}/policy/verify`, {
                signal: AbortSignal.timeout(API_TIMEOUT_MS),
              }),
            ]);
    
            if (!bondRes.ok) {
              const text = await bondRes.text();
              throw new Error(`bond ${bondRes.status}: ${text}`);
            }
            if (!policyRes.ok) {
              const text = await policyRes.text();
              throw new Error(`policy ${policyRes.status}: ${text}`);
            }
    
            const bond = await bondRes.json();
            const policy = await policyRes.json();
    
            const reputation = {
              agent_id,
              attestation_count: bond.attestation_count ?? null,
              violations: bond.violations ?? null,
              bonds: bond.bonds ?? null,
              compliant: policy.compliant ?? null,
            };
    
            return {
              content: [
                {
                  type: "text" as const,
                  text: JSON.stringify(reputation, null, 2),
                },
              ],
            };
          } catch (err) {
            const msg = err instanceof Error ? err.message : String(err);
            return {
              content: [{ type: "text" as const, text: `Error: ${msg}` }],
              isError: true,
            };
          }
        }
      );
    }
  • Imports and constants: imports McpServer from MCP SDK and Zod for schema validation, defines ZAP1_API base URL and API_TIMEOUT_MS constant.
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { z } from "zod/v4";
    
    const ZAP1_API = process.env.ZAP1_API_URL ?? "https://pay.frontiercompute.io";
    const API_TIMEOUT_MS = 15_000;
  • Tool registration name 'zcash_reputation_score', description, and input schema: requires agent_id (string, max 128 chars).
    server.tool(
      "zcash_reputation_score",
      "Fetch an agent's reputation from ZAP1. Combines bond data and policy compliance into a single object: attestation count, violations, bonds, and compliant flag.",
      {
        agent_id: z.string().max(128).describe("Agent identifier to look up"),
      },
  • src/index.ts:21-21 (registration)
    Import of registerReputationTool from the reputation module.
    import { registerReputationTool } from "./tools/reputation.js";
  • src/index.ts:46-46 (registration)
    Registration call: registerReputationTool(server) which triggers server.tool(...) to register the 'zcash_reputation_score' tool.
    registerReputationTool(server);
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose behavioral traits such as read-only nature, required permissions, error handling, or rate limits. The output structure is described, but deeper behavioral context is missing.

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 a single, well-structured sentence that immediately states the tool's purpose and key output components. It is front-loaded with the verb and resource, with no unnecessary words.

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?

Given the lack of output schema, the description adequately covers the return values. However, it does not address edge cases (e.g., agent not found) or prerequisites. For a simple tool, this is nearly complete but could be enhanced.

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?

The input schema covers 100% of the parameters with a clear description for 'agent_id'. The description adds little beyond confirming the source (ZAP1), so it meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch', the resource 'agent's reputation from ZAP1', and lists the output components (attestation count, violations, bonds, compliant flag). It is distinct from any sibling tools, which focus on other Zcash operations.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives, nor conditions under which it should not be used. The description only explains what the tool does, not when to employ it.

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/Frontier-Compute/zcash-mcp'

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