Skip to main content
Glama

Agent Data Tools: Utilities

Agent memory, save: key value store for agents

memory_set
DestructiveIdempotent

Save a value (up to 8,000 characters of text or JSON) under a key in your own namespace, so an agent can remember facts, preferences or task state between runs. Overwrites an existing key; expires after 1 to 30 days (default 30). 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 persist what an agent learned for a later call to memory_get. Price $0.002/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Changes only what you saved in your own memory namespace; 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>",
      "value": "<value>"
    },
    "name": "memory_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe key, up to 200 characters
daysNoDays to keep it, 1 to 30 (default 30)
valueYesThe text or JSON to save, up to 8,000 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.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint and idempotentHint, but the description adds substantial context beyond them: overwrite semantics for existing keys, a 1-30 day TTL with a 30-day default and the fact that values persist until expiry or deletion, and cross-region read lag of up to a minute. It also discloses cost ($0.002/call via x402 or card key, first 10 free, failed calls free) and confirms side effects are confined to the caller's own namespace.

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 core action and scope are front-loaded in the first clause, and most sentences carry operational information. There is mild redundancy: retention is restated ('expires after 1 to 30 days' then 'kept until they expire (at most 30 days)') and pricing is repeated at the end ('each call is charged, so repeats are not free') after the price was already given.

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 four-parameter write tool with no output schema, everything an agent needs is covered: what to send, size limits, TTL behavior, overwrite semantics, namespace isolation and secret handling, eventual-consistency lag, and cost model. Nothing material is missing that would cause an incorrect 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?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: the 8,000-character value ceiling, the 1-30 day retention window with default 30, and the overwrite behavior tied to reusing a key. The namespace isolation note reinforces the security framing already present in the schema, so this is above baseline without being fully additive.

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-plus-resource (save a value under a key in your own namespace) and the purpose (remember facts, preferences, task state between runs). It also explicitly routes the reader to the sibling memory_get, so an agent can tell it apart from the read path without opening another 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?

'Use to persist what an agent learned for a later call to memory_get' gives clear positive guidance and names the retrieval counterpart. It also warns that each call is charged and repeats are not free, discouraging redundant writes. It stops short of stating explicit when-not-to-use conditions, such as using memory_delete or memory_list instead.

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