Skip to main content
Glama

memory_add

Save durable project memories—preferences, decisions, conventions, and bug-fix root causes—to shared storage so AI agents can reuse context later.

Instructions

Save a new durable memory into the shared authoritative memory. USE THIS when: the user states a preference, a project decision is made, a convention is established, a non-obvious bug is fixed (root cause + fix), or important project/environment context is learned. Do NOT store secrets, tokens, or throwaway information.

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": {
      "title": "<title>",
      "content": "<content>",
      "agent": "<agent>"
    },
    "name": "memory_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoLowercase tags, e.g. ['typescript','ui','deploy']
agentYesWhich agent is saving this; use 'shared' for universal rules
titleYesShort, searchable, imperative title (<= 80 chars recommended)
sourceNoOrigin: agent, user, notion, import, or system
contentYesFull memory content: concise but complete, with examples when helpful
projectNoProject/repository scope; optional for legacy databases
categoryNoother
confidenceNo
importanceNomedium
supersedesNoID of an older memory replaced by this one
verifiedAtNoISO timestamp when this memory was last verified
freshnessDaysNoDays before this memory is considered stale
allowDuplicateNoExplicitly allow a similar memory to be saved
idempotencyKeyNoReuse the same key when retrying one memory_add operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / verifiedAt / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
  2. Changed8 schema fields changedv1.6.0
    • addedInput schema / properties / allowDuplicate
      Added value: +{
      +  "default": false,
      +  "description": "Explicitly allow a similar memory to be saved",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / confidence
      Added value: +{
      +  "enum": [
      +    "high",
      +    "medium",
      +    "low"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / freshnessDays
      Added value: +{
      +  "description": "Days before this memory is considered stale",
      +  "maximum": 3650,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / idempotencyKey
      Added value: +{
      +  "description": "Reuse the same key when retrying one memory_add operation",
      +  "maxLength": 128,
      +  "minLength": 8,
      +  "pattern": "^[A-Za-z0-9._:-]+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Project/repository scope; optional for legacy databases",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Origin: agent, user, notion, import, or system",
      +  "maxLength": 40,
      +  "type": "string"
      +}
    • addedInput schema / properties / supersedes
      Added value: +{
      +  "description": "ID of an older memory replaced by this one",
      +  "type": "string"
      +}
    • addedInput schema / properties / verifiedAt
      Added value: +{
      +  "description": "ISO timestamp when this memory was last verified",
      +  "format": "date-time",
      +  "type": "string"
      +}
  3. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It discloses durability, shared/authoritative scope, and a safety rule against secrets, but says nothing about duplicate detection (only inferable from allowDuplicate), what happens on a near-duplicate, permission requirements, or what the call returns — notably the new memory's ID, which matters for the supersedes parameter.

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, front-loaded with the action, then a tightly scoped trigger list and a prohibition. Every clause earns its place and nothing is repeated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter mutation tool with no annotations and no output schema, the description covers intent and exclusions well but leaves the agent guessing about deduplication behavior, the supersedes workflow, idempotent retries, and the return value. Adequate but with clear gaps given the tool's complexity.

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 79%, so the baseline is 3. The description adds only the general notion of durable shared storage, which loosely supports agent='shared'; it explains nothing about supersedes, idempotencyKey, freshnessDays, or the category/importance enums beyond what the schema already documents.

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: 'Save a new durable memory into the shared authoritative memory.' The word 'new' implicitly separates it from memory_update and memory_get, but no sibling is named explicitly, so the differentiation is inferential rather than stated.

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?

Provides an explicit trigger list (user preference, project decision, convention, non-obvious bugfix with root cause, environment context) plus a clear exclusion (no secrets, tokens, or throwaway info). It does not say what to do when a similar memory already exists — e.g. use memory_update or set supersedes — which is the main routing gap.

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