Skip to main content
Glama

attest_decision

Verify and anchor AI agent decisions on Base and Solana with cryptographic signatures, producing auditable on-chain proof URLs for autonomous approvals or model attestation.

Instructions

Verify a wallet signature over (input_hash, output_hash, decision) with domain separation, then dual-chain anchor the resulting Merkle root on Base and Solana mainnet. Returns the verified signer plus on-chain proof URLs. Use when an AI agent's decision needs a cryptographic, auditable receipt — autonomous trade approvals, AI-assisted contract decisions, model-output attestation for liability records. $0.010 USDC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_hashYes64-char hex SHA-256 of the agent's input.
output_hashYes64-char hex SHA-256 of the agent's output / decision payload.
decisionYesFree-form short label, e.g. "APPROVED", "REJECTED", "CONFIDENCE=0.93" (max 64 chars).
schemeYesSignature scheme.
signatureYes0x-prefixed hex (eip191) or base58 (ed25519).
signer_pubkeyNoRequired for ed25519 (Solana base58 pubkey).

Implementation Reference

  • Tool definition and inputSchema for 'attest_decision' — defines the name, description, and inputSchema (input_hash, output_hash, decision, scheme, signature, signer_pubkey) for the tool.
    {
      name: "attest_decision",
      description:
        "Verify a wallet signature over (input_hash, output_hash, decision) with domain separation, then dual-chain anchor the resulting Merkle root on Base and Solana mainnet. Returns the verified signer plus on-chain proof URLs. Use when an AI agent's decision needs a cryptographic, auditable receipt — autonomous trade approvals, AI-assisted contract decisions, model-output attestation for liability records. $0.010 USDC.",
      inputSchema: {
        type: "object",
        properties: {
          input_hash: { type: "string", description: "64-char hex SHA-256 of the agent's input." },
          output_hash: { type: "string", description: "64-char hex SHA-256 of the agent's output / decision payload." },
          decision: { type: "string", description: 'Free-form short label, e.g. "APPROVED", "REJECTED", "CONFIDENCE=0.93" (max 64 chars).' },
          scheme: { type: "string", enum: ["eip191", "ed25519"], description: "Signature scheme." },
          signature: { type: "string", description: "0x-prefixed hex (eip191) or base58 (ed25519)." },
          signer_pubkey: { type: "string", description: "Required for ed25519 (Solana base58 pubkey)." },
        },
        required: ["input_hash", "output_hash", "decision", "scheme", "signature"],
      },
    },
  • index.js:202-204 (registration)
    Registration of the tool via ListToolsRequestSchema handler — the TOOLS array is exposed through the MCP ListTools handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • Handler case for 'attest_decision' in the buildRequest switch — constructs the HTTP POST request to /v1/attest with the tool's arguments (input_hash, output_hash, decision, scheme, signature, optional signer_pubkey).
    case "attest_decision":
      return {
        url: `${BASE_URL}/v1/attest`,
        opts: {
          method: "POST",
          headers: { "Content-Type": "application/json" },
          body: JSON.stringify({
            input_hash: args.input_hash,
            output_hash: args.output_hash,
            decision: String(args.decision).slice(0, 64),
            scheme: args.scheme,
            signature: args.signature,
            ...(args.signer_pubkey ? { signer_pubkey: args.signer_pubkey } : {}),
          }),
        },
      };
Behavior5/5

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

No annotations provided, but description fully discloses the verification process, domain separation, dual-chain anchoring, return values, and cost ($0.010 USDC), meeting the burden.

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?

Two sentences cover the core function and use cases, with cost appended. Every sentence earns its place; no wasted 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?

Explains return value (signer + proof URLs) and includes cost. Lacks error handling or prerequisites, but sufficient for a straightforward tool with clear inputs.

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 covers all parameters with descriptions (100% coverage). Description adds no extra parameter details beyond the overall process, so baseline score applies.

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?

Clearly states the tool verifies a wallet signature and anchors a Merkle root on two chains, with specific verbs and resources. No confusion with siblings.

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?

Explicitly lists use cases (autonomous trade approvals, AI-assisted contract decisions, etc.) and provides context. Lacks explicit 'when not to use', but sufficient for the intended purpose.

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/hypeprinter007-stack/anchor-x402-mcp'

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