Skip to main content
Glama

Agent Memory (Key-Value Store)

agent_memory
Destructive

Persistent memory for AI agents without an account: store JSON under a key and read it back in a later run, or share it with other agents. Your first write creates a store and returns its secret (mem_...); pass it as store on every later call. Operations: set (with optional if_version for safe concurrent updates), get, get_many, delete, list (prefix, tag, paging), search (words in keys and values), append (rolling list such as a log or task queue, oldest items drop off), incr (atomic counter). Up to 64 KB per value, 1000 keys and 5 MB per store, kept 1 to 365 days (default 30, renewed on every write). One price per operation. Price: $0.002 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"op":"get","store":"mem_demo_read_only","key":"example"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoincr step, default 1
opNoDefault: set if value is given, get if key is given, else list
keyNo
tagNo
keysNoFor get_many and delete
tagsNo
afterNolist: continue after this key
limitNo
queryNosearch: words that must all appear in key or value
storeNoStore secret from an earlier call (mem_...). Omit on your first write to create a store
valueNoAny JSON value, up to 64 KB (set, append)
prefixNo
ttl_daysNo
max_itemsNoappend: keep at most this many items, default 100, max 1000
if_versionNoset only if the current version matches (0 = key must not exist)
with_valuesNolist: include values

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / value / type
      Added value: +[
      +  "object",
      +  "array",
      +  "string",
      +  "number",
      +  "boolean"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (destructive, non-idempotent, openWorld), the description discloses pricing and payment mechanism ($0.002 USDC per call via x402, which chains), the store-secret lifecycle, TTL renewal on every write, storage quotas (64 KB/value, 1000 keys, 5 MB/store), and if_version for concurrency. This is far more than the annotations carry.

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?

Dense but front-loaded: purpose and store lifecycle come first, then the op list, then limits and pricing, then a concrete sample call. Every sentence carries information, though the single paragraph is long enough that structure could be tighter.

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 16-param mutation+read tool with no output schema, the description covers operational semantics, quotas, retention, auth/payment requirements, and a runnable example. An agent has everything needed to invoke it correctly on first call.

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?

With 63% schema coverage and 16 params, the description adds real meaning: it explains each op's behavior (append drops oldest items, incr is atomic, search matches words in keys and values), the set/append value semantics, and the if_version=0 convention. It does not clarify a few params (tag/tags/limit defaults) beyond the schema.

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 description states a specific verb+resource ('persistent memory for AI agents... store JSON under a key and read it back in a later run') and enumerates all eight operations by name. No sibling tool overlaps this capability, so it is unambiguously distinguishable.

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 clear when-to-use context (persist state across runs, share with other agents) and the first-write-creates-a-store workflow with the mem_ secret. It does not name any alternative tool or state when not to use this, but there is no obvious sibling to route against, so context is strong.

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