Skip to main content
Glama

memory_add

Stores a memory for later retrieval and reports duplicate or vectorization failure, enabling agents to persist facts, preferences, episodes, or notes with optional scope and TTL.

Instructions

Store a memory for later retrieval. Returns duplicate=true when identical content already exists (no new record), and embedding_failed=true when the memory was saved but vectorization failed (keyword search still works).

Input Schema

NameRequiredDescriptionDefault
kindNooptional kind: fact, preference, episode, or note; defaults to note
scopeNooptional scope, for example project:opc; defaults to 'default'
contentYesthe memory text to store
ttl_hoursNooptional time-to-live in hours; 0 means the memory never expires

Output Schema

NameRequiredDescriptionDefault
idYesthe id of the stored (or already existing) memory
dry_runYestrue when redaction ran in dry-run mode and the content was stored unchanged
embeddedYestrue when a vector was written for this memory
redactedYestrue when the content hit redaction rules before being stored
duplicateYestrue when identical content already exists in the same tenant/scope; no new record was written
redactionsYesnames of the redaction rules that matched; never contains the original text
embedding_errorNothe vectorization error, present only when embedding_failed is true
embedding_failedYestrue when the memory was saved but vectorization failed; keyword search still works

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose genuinely useful behavior beyond the schema: duplicate detection yields duplicate=true with no new record, and partial failure yields embedding_failed=true while keyword search still works. What's missing is dedup semantics (is identity based on content alone or content+scope?), whether the call is idempotent, and any permission or rate-limit expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler, with the core purpose front-loaded and the return-flag caveats following. Every clause conveys actionable information.

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?

An output schema exists, so explaining return values isn't strictly required (though the flags provided are useful). For a mutation tool with no annotations, the description adequately conveys the failure model, but it stops short of stating whether writes are irreversible, how duplicates are keyed, or how expiration behaves — gaps an agent would want before writing.

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%, so kind, scope, content, and ttl_hours are already documented in the schema. The description adds no additional meaning about parameter behavior — notably nothing on how scope interacts with duplicate detection or on ttl_hours expiry semantics. 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?

States a specific verb and resource: "Store a memory for later retrieval." It's immediately distinguishable from memory_search and memory_delete by name and verb. However, it never explicitly contrasts itself with those siblings or clarifies boundaries (e.g., add vs. update semantics).

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?

"for later retrieval" implies the write-then-search workflow with memory_search, but there is no explicit when-to-use/when-not, no naming of alternatives, and no guidance on prerequisites such as whether a matching memory should be searched for first. Usage is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools