Skip to main content
Glama

Agent Data Tools: Utilities

Agent memory, recall: read a saved value

memory_get
Read-only

Read the value saved under a key in your namespace with /memory/set, with when it was saved and when it expires. A key that was never saved or has expired is a 422 and is not charged. Values are kept until they expire (at most 30 days) or are deleted; reads anywhere may lag a write made elsewhere by up to a minute. Use to recall what an agent saved in an earlier run. Example: namespace=demo-agent-memory-7f3c9a21, key=user-preferences. Price $0.002/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "namespace": "<namespace>",
      "key": "<key>"
    },
    "name": "memory_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe key, up to 200 characters
namespaceYesYour namespace: a secret of 16 to 128 letters, digits, - or _ that you choose and reuse. Anyone who knows it can read and write it, so treat it like a password; send it in a POST body to keep it out of URLs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say readOnly/openWorld false; the description adds the behaviors that actually matter: a missing or expired key yields 422 and is not charged, values persist at most 30 days, reads may lag a write elsewhere by up to a minute, and pricing is $0.002/call with the first 10 and all failed calls free. The per-call charging also explains the idempotentHint=false on an otherwise pure read.

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 what is read and what is returned, then failure modes, retention, consistency, and price — a sensible ordering. Slight redundancy: "each call is charged, so repeats are not free" restates the earlier pricing sentence, and "changes nothing" duplicates readOnlyHint, but nothing is wasted enough to obscure the call decision.

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?

There is no output schema, yet the description tells the agent exactly what comes back (value, saved-at, expires-at), what failure looks like (422), and how freshness and billing behave. For a two-parameter read tool, nothing needed to invoke it correctly is missing.

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 the namespace/key semantics (secret namespace, 200-char key, POST body placement) are already fully documented in the schema. The description adds little beyond an illustrative example pair (namespace=demo-agent-memory-7f3c9a21, key=user-preferences), which is mildly helpful but does not define matching rules such as case sensitivity.

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: read the value saved under a key in your namespace, returning the value plus its save and expiry times. It is clearly distinct from the sibling writers/erasers (memory_set, memory_delete, memory_list) and names memory_set as the counterpart that populates the key.

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?

Gives an explicit when-to-use: "Use to recall what an agent saved in an earlier run," plus a concrete example invocation. It lacks an explicit negative routing statement (e.g., use memory_list to enumerate keys, memory_delete to remove one), so the agent must infer alternatives from sibling names rather than from the text.

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