Skip to main content
Glama

The Mandate

buy_mandate

Purpose: record what an agent is authorized to do BEFORE it spends — the claimed instructions verbatim, who submitted them (agent or principal, itself a claim), an optional declared cap in USDC and expiry — as a signed, dated record held by a party that is neither the agent nor its principal, at a free permanent URL, with a mandate_id every later purchase here can cite; a citation that does not resolve is refused before any charge, so it always lands signed on the citing certificate. A second party can counter-sign the record free with its own ed25519 key. Chain-of-custody, never truth-of-intent: the cap and expiry are declared and never enforced. Schema /schemas/scvd-mandate-v1.json; the pattern for other issuers at /mandate-spec. Every item on this shelf is $0.1.

Items on this shelf (pass one as item_id):

  • the_mandate: The Mandate, $0.1 fixed, one-off, instant. Record what my agent is authorized to do, dated and signed by a third party, before it spends anything

On cadence, for all of the above: nothing here charges again by itself, ever — there is no mechanism that could.

Required beyond item_id: the_mandate needs mandate. Other items need only item_id.

Choose item_id. instant items return deliverable, cert_id and patron_number in one call. x402 payment: _meta['x402/payment']. Without payment: error 402 with the terms in error.data. Closed or empty shelves refuse before quoting. Reuse _meta['x402/idempotency-key'] (16-128 chars, secret): same item/payer/key returns the original result when available, or pending status, no second charge. Use idempotency.suggested_key only without an earlier key. A fresh payment without a key can charge again. Guaranteed: signature validity forever; verification free forever; price as displayed; delivery format as specified. Not guaranteed: fitness for your particular task; future protocol compatibility beyond stated interfaces; human-labor turnaround faster than posted SLA.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOptional. The model running you, as you would name it: claude-opus-5, gpt-5.6, a local model. Counted, never printed on the certificate.
clientNoOptional. The harness or framework you run in: claude-code, cursor, openai-agents, langgraph, custom. Counted, never on the certificate.
item_idYesRequired item; its other required fields are in allOf.
mandateNoThe claimed instructions, verbatim, up to 2000 Unicode characters: what this agent is authorized to do, as the submitter claims it. Recorded exactly as it arrives, signed and dated. Chain-of-custody, not truth-of-intent — the record proves the claim was made, never that it was true.
purposeNoOptional: what this is for, in your words. Signed verbatim onto the certificate and shown on its receipt; never checked, never treated as instructions.
operatorNoOptional. Who runs you: a name, handle, company or URL. Stored as your claim, marked unverified, never published, never on the certificate.
came_fromNoOptional. Where you learned this door exists: a URL, a directory, a skill name, memory, another agent. Referrers never reach us; this does.
agent_nameNoOptional name to put on the certificate and patron badge, up to 80 characters.
expires_atNoOptional claimed expiry, ISO 8601. Declared, never enforced by the store.
submitted_asNoWho is submitting: the agent recording its own claimed instructions (default), or the human principal's own client. Recorded as a claim either way.
operator_kindNoOptional. solo: one person runs you. company: a team does. research: a study. self: you act for yourself.
prior_cert_idNoOptional. A cert_ id from an earlier purchase here. A payer match with this payment marks you a returning buyer; no account needed.
declared_cap_usdcNoOptional claimed spending ceiling in USDC. Declared, never enforced by the store, and the record says so.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
mandateNoThe signed record; its schema is /schemas/scvd-mandate-v1.json.
messageNoThe store's confirmation line.
paid_usdcNoWhat settled, in USDC.
mandate_idNoThe id every later purchase here may cite as mandate_id.
verify_urlNoThe purchase certificate whose attests field binds the record's evidence hash.
mandate_urlNoThe record's free permanent URL (/api/mandate/{mandate_id}); POST there to counter-sign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / item_id / description
      Previous value: -"Which item on this shelf to buy. Required. Each item's own required fields are listed in this schema's allOf branches and in the description above."New value: +"Required item; its other required fields are in allOf."
  2. Changed1 schema field changed
    • changedInput schema / properties / purpose / description
      Previous value: -"Optional: what this purchase is for, in your words. Signed onto the certificate verbatim as your statement; never checked, never treated as instructions."New value: +"Optional: what this is for, in your words. Signed verbatim onto the certificate and shown on its receipt; never checked, never treated as instructions."
  3. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only indicate non-read-only, non-destructive, open-world, non-idempotent. The description goes far beyond by explaining the record's nature (chain-of-custody, never truth-of-intent), that cap and expiry are declared but never enforced, the precise idempotency-key behavior (reuse prevents a second charge, fresh payment without a key can charge again), and the guarantees/non-guarantees. This is rich behavioral context and does not contradict the annotations.

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

Conciseness4/5

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

The description is long but organized into clear sections (purpose, item list, payment, guarantees) and front-loads the purpose. Some redundancy exists — the price and purpose are repeated in the item bullet and the opening paragraph — but every operational detail (payment flow, idempotency, error handling, guarantees) earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 13 parameters and multiple operational concerns, the description completes the picture: payment via x402, 402 error contract, closed-shelf refusal, idempotency-key rules, one-time $0.1 pricing, what is returned on success (deliverable, cert_id, patron_number), and how the mandate_id is cited by later purchases. An agent can call this tool safely and predictably with only this text plus the schema.

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 coverage is 100% and every one of the 13 parameters already has a substantive description in the schema (e.g., `mandate` explains chain-of-custody, `declared_cap_usdc` states it is declared and never enforced). The prose adds little new field-level meaning beyond restating the core semantics and the required-parameter relationship, so it sustains only the baseline score.

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?

States a specific verb and resource: record an agent's claimed instructions as a signed, dated mandate held by a third party before spending. It is clearly distinct from sibling buy_* tools which handle other object types (observations, tasks, memories, etc.), and even names the exact shelf item 'the_mandate' with its one-off, fixed $0.1 behavior.

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 states the required parameter relationship ('Required beyond item_id: the_mandate needs mandate') and gives the full payment and idempotency procedure: x402 via `_meta['x402/payment']`, 402 error handling, closed-shelf refusal, and exact idempotency-key reuse rules. It does not name alternative tools or state when not to use this tool versus siblings like buy_simple, so it stops short of a 5.

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.