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. MPP when quoted: error.data['org.paymentauth/payment-required']; retry identical arguments with the signed credential in _meta['org.paymentauth/credential'] and the quote's retry key. Send only one payment protocol.

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 purpose: signed verbatim on certificate, shown on receipt; never checked or 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 certificate and patron-badge name; 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.
cited_artifactNoOptional: an outside artifact behind this purchase (your runtime's approval or intent receipt) as <format>:<reference>, e.g. dsse:art_e415901189dc1613. Signed verbatim onto the certificate; never fetched or verified here.
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 / agent_name / description
      Previous value: -"Optional name to put on the certificate and patron badge, up to 80 characters."New value: +"Optional certificate and patron-badge name; up to 80 characters."
  2. Changed1 schema field changed
    • changedInput schema / properties / purpose / description
      Previous 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."New value: +"Optional purpose: signed verbatim on certificate, shown on receipt; never checked or treated as instructions."
  3. Changed1 schema field changed
    • addedInput schema / properties / cited_artifact
      Added value: +{
      +  "description": "Optional: an outside artifact behind this purchase (your runtime's approval or intent receipt) as <format>:<reference>, e.g. dsse:art_e415901189dc1613. Signed verbatim onto the certificate; never fetched or verified here.",
      +  "maxLength": 160,
      +  "pattern": "^[a-z0-9][a-z0-9_.+-]{0,31}:[!-~]{1,128}$",
      +  "type": "string"
      +}
  4. 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."
  5. 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."
  6. Added

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses meaningful behavior: a cited mandate_id that fails to resolve is refused before any charge, the cap and expiry are declared and never enforced, a second party may counter-sign for free, and it lists what is guaranteed (signature validity, verification, price) versus not. The idempotency-key semantics are consistent with idempotentHint=false rather than contradicting it.

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 'Purpose:' prefix front-loads the core idea well, but the text then sprawls into a one-item shelf listing (redundant since item_id has a single enum value), cadence boilerplate, and a long payment-protocol block. Sections are present but the whole is denser than needed for a single-item tool.

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?

With 14 parameters fully documented in the schema, an output schema present, and the description covering payment flows, 402/MPP error handling, idempotency, and guarantee limits, an agent has enough to call this correctly. The remaining omission is any explicit routing versus the other buy_* tools.

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 description coverage is 100% and the per-parameter descriptions are already exhaustive, including the declared-never-enforced semantics of declared_cap_usdc and expires_at. The description restates mandate as 'claimed instructions verbatim' and the cap/expiry as optional declarations, adding little beyond the schema, so the baseline 3 applies.

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

Purpose4/5

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

The description states a specific verb and resource — record an agent's claimed authorization, signed and dated by a third party, before spending — and clarifies the artifact's nature (chain-of-custody, not truth-of-intent). It doesn't explicitly differentiate itself from siblings like buy_signed_record or buy_observation, which it most closely resembles, but the resource is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied ('BEFORE it spends') rather than contrasted: there is no statement of when to prefer this over buy_signed_record or buy_memory_anchor. The description does give solid operational guidance for the call itself (choose item_id, the_mandate requires mandate, payment retry rules), but alternative selection is left to inference.

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.