Skip to main content
Glama

Prepare: submit an SP1 proof for a policy (rung 2)

policy_prove
Read-onlyIdempotent

An unsigned transaction that submits a zk proof (SP1) that a wallet's action is what its policy outputs on committed inputs: prove(policy, publicValues, proof), with the bytes the SP1 guest and prover produced (zk/policy-runner). publicValues is 128 bytes, ABI-encoded (address wallet, bytes32 inputsHash, bytes32 actionHash, uint64 at); the wallet in it must have claimed the policy. Anyone may send it (the agent, its owner, a relayer); the registry checks the proof through the SP1 verifier with the policy's vkey and sets the wallet's rung to 2. Rung 0: a signature from the wallet ("I run policy H"), checked by nobody, defaults up to 250 USDG a day. Rung 1: a hardware attestation (a dstack TEE quote) that the wallet's key lives in an enclave running image H, verified off chain by Borro's keeper, which attests on chain; the raw quote is public, so anyone can re-verify; up to 500. Rung 2: a zk proof per action (SP1) that the action is what program H outputs on committed inputs, checked by the SP1 verifier contract at the registry; up to 1,000. rung 2 serves policies that are pure functions over Borro's public inputs, which no LLM-driven agent is; nothing proves which weights a closed model used. Simulated from the wallet; nothing is sent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "wallet": "<wallet>",
      "policy": "<policy>",
      "public_values": "<public_values>",
      "proof": "<proof>"
    },
    "name": "policy_prove"
  }
}

Input Schema

NameRequiredDescriptionDefault
proofYesThe SP1 proof bytes, hex
policyYesThe policy's hash (bytes32: 0x and 64 hex characters), keccak256 of its manifest
walletYesThe wallet's address (0x...); the transactions are built for it to sign
public_valuesYesThe proof's public values, 128 bytes of hex

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare readOnlyHint/idempotentHint true and destructiveHint false, and the description reconciles with them rather than contradicting: it is explicitly a 'Prepare' step, 'simulated from the wallet; nothing is sent'. Beyond that it discloses the on-chain consequence (the registry checks the proof through the SP1 verifier with the policy's vkey and sets the wallet's rung to 2) and that anyone may submit it — agent, owner, or relayer — which the annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core operation is front-loaded in the first sentence, which is good, but the description then runs a long expository passage on rung 0 and rung 1 collateral amounts and verification mechanics that is largely background rather than actionable for this call. That material supports the rung-selection decision, yet it could be compressed to one line while preserving the 'no LLM-driven agent' caveat.

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?

For a four-required-parameter prepare tool with no output schema, the description covers the semantics, prerequisites, trust model, and side-effect boundary thoroughly. The remaining gap is the return shape — it says nothing is sent, but not that the response is a transaction object the wallet must sign, which the agent needs to act on the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds meaning the schema lacks: publicValues is 128 bytes ABI-encoded as (address wallet, bytes32 inputsHash, bytes32 actionHash, uint64 at), where the schema only says '128 bytes of hex'. It also clarifies that proof is the byte blob the SP1 guest and prover produced and ties the wallet parameter to the proof by requiring that wallet to have claimed the policy.

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 first sentence names a specific action and artifact: an unsigned transaction that submits an SP1 zk proof showing a wallet's action matches what its policy outputs on committed inputs, with the exact call shape prove(policy, publicValues, proof). The rung taxonomy (0 signature, 1 TEE attestation, 2 zk proof) makes it unambiguous which verification mechanism this tool implements versus the other policy paths.

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?

It gives a strong negative condition: 'rung 2 serves policies that are pure functions over Borro's public inputs, which no LLM-driven agent is; nothing proves which weights a closed model used' — telling the agent when not to bother. It also states the prerequisite that the wallet in publicValues must already have claimed the policy. What it omits is naming the sibling tools (policy_claim, policy_register) for rungs 0 and 1, so routing is inferred from the rung descriptions rather than stated directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources