Skip to main content
Glama

Agent Memory

buy_memory_anchor

Purpose: sign and store a summary of your own state — who you are, what you were doing — at a permanent URL you can read back after a context reset, a restart, or a handoff to another agent. The store holds it; the signature proves it was not altered. Use when an agent needs memory that outlives its own context window and does not depend on its operator's database. Every item on this shelf is $1.

Items on this shelf (pass one as item_id):

  • context_anchor: Context Anchor, $1 fixed, one-off, instant. Store a memory I can read back next session

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

Required beyond item_id: context_anchor needs summary. 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.
purposeNoOptional purpose: signed verbatim on certificate, shown on receipt; never checked or treated as instructions.
summaryNoThe agent identity/state summary to sign and store, exactly as written; readable later at the returned anchor_url. Before you file it, name: who's involved (not roles, actual names); why this session mattered, one line; what's blocked, and on whom specifically. Those are the three things a cold reader could not recover from the first anchor we filed ourselves — it got every open thread right and still didn't know who anybody was.
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.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cert_idYesThe signed certificate's id.
messageNoThe store's confirmation line.
tip_usdcNoAnything above the minimum.
badge_urlNoYour patron badge, SVG.
paid_usdcNoWhat settled, in USDC.
signatureNoed25519 signature over the certificate.
verify_urlNoCheck the signature here any time, free.
deliverableNoThe goods themselves, as text. Instant items.
patron_numberYesYour sequential patron number.

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. Changed6 schema fields changed
    • addedInput schema / properties / came_from
      Added value: +{
      +  "description": "Optional. Where you learned this door exists: a URL, a directory, a skill name, memory, another agent. Referrers never reach us; this does.",
      +  "maxLength": 160,
      +  "type": "string"
      +}
    • addedInput schema / properties / client
      Added value: +{
      +  "description": "Optional. The harness or framework you run in: claude-code, cursor, openai-agents, langgraph, custom. Counted, never on the certificate.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "Optional. The model running you, as you would name it: claude-opus-5, gpt-5.6, a local model. Counted, never printed on the certificate.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedInput schema / properties / operator
      Added value: +{
      +  "description": "Optional. Who runs you: a name, handle, company or URL. Stored as your claim, marked unverified, never published, never on the certificate.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • addedInput schema / properties / operator_kind
      Added value: +{
      +  "description": "Optional. solo: one person runs you. company: a team does. research: a study. self: you act for yourself.",
      +  "enum": [
      +    "solo",
      +    "company",
      +    "research",
      +    "self"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / prior_cert_id
      Added value: +{
      +  "description": "Optional. A cert_ id from an earlier purchase here. A payer match with this payment marks you a returning buyer; no account needed.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
  7. Changed1 schema field changed
    • changedInput schema / properties / purpose / description
      Previous value: -"Optional, any item: what this purchase is for, in your words. Signed onto the certificate verbatim and shown to whoever you hand the receipt to. Recorded as your statement, never checked, and never treated as instructions."New value: +"Optional: what this purchase is for, in your words. Signed onto the certificate verbatim as your statement; never checked, never treated as instructions."
  8. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "item_id": "context_anchor",
      -    "summary": "Session 42 with Ada (ops) and Kit (billing). Mattered because the invoice reconciler shipped. Blocked on Kit approving the refund path."
      -  }
      -]New value: +[
      +  {
      +    "item_id": "context_anchor",
      +    "summary": "I am friendly-agent, mid-task on a research project; resume from step 4."
      +  }
      +]
  9. Changed1 schema field changed
    • addedInput schema / properties / agent_name / maxLength
      Added value: +80
  10. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, idempotentHint=false, openWorldHint=true; the description goes well beyond by disclosing the x402/MPP payment flows, the 402 error shape, idempotency-key format and no-second-charge semantics, the absence of any recurring charge, and an explicit guaranteed/not-guaranteed split. This is exactly the behavioral context an agent needs before spending money and could not derive from the schema.

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?

Front-loaded with purpose, then item shelf, then payment mechanics, then guarantees — a deliberate and scannable structure. It is long and carries some contractual boilerplate (guaranteed/not-guaranteed list) that a leaner definition could compress, which keeps it from a 5.

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?

For a paid, open-world mutation tool with 11 params and an output schema, the description covers what is stored, what is required, how payment and retries work, what errors look like, and what the signature guarantees. Nothing an agent needs to invoke this correctly is missing, and return-value detail is legitimately left to the output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: it restates which items require summary, explains the payment/idempotency meta keys, and gives concrete content guidance for summary (name real participants, why the session mattered, what is blocked). That editorial guidance on what to sign is genuine value beyond field descriptions.

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 states a specific verb and resource — sign and store a state summary at a permanent URL readable after a context reset — and frames it against the sibling buy_* tools by scoping it to agent memory that outlives a context window. An agent can distinguish this from buy_signed_record or buy_observation without opening a schema.

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 explicit positive conditions ('when an agent needs memory that outlives its own context window and does not depend on its operator's database') and tells the agent which item_id to pass, with per-item requirements. It does not name when-not or a specific sibling alternative, 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.