Skip to main content
Glama

create_ai_memory_item

Destructive

Save an AI memory item. Required: name, content. Scope it with entity ('lead'|'contact'|'account'|'campaign') + entity_id (a CRM record) AND/OR brain_id + agent_id (agent 'brain' memory). category is a free topical label (default 'general'). importance 1-5 (default 3) for ranking. key = stable handle for upsert (update the same fact instead of appending); the key is unique PER SCOPE (entity + entity_id + agent_id + brain_id), so the same key on two different leads keeps two items. The result says which scope was written. source, occurred_at (ISO original date) optional. (Legacy: parent_id = entity_id.) DURABLE RULE from a human for an agent ("ab jetzt immer …"): agent_id = that agent (yourself), category 'regel', importance 5, content = the rule quoted verbatim + ' — , '; it is loaded into every later run (runner and server_job, get_agent_bootstrap agentRules). An agent writing its OWN memory is never parked for approval.

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": {
      "name": "<name>",
      "content": "<content>"
    },
    "name": "create_ai_memory_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoStable handle → upsert instead of duplicate, within the scope (the same key on another record is another item)
nameYesName of the AI memory item
entityNolead|contact|account|campaign|user|asbest_project|raumbuchung_booking
sourceNoWhere the fact comes from (optional provenance)
contentYesText content of the memory item
agent_idNoOwning agent (omit = shared across the user's agents)
brain_idNoAgent brain (category) this memory belongs to
categoryNoFree topical label (default 'general')
entity_idNoRecord id to attach to
parent_idNoLegacy alias for entity_id
importanceNo1-5, default 3
occurred_atNoISO date the fact originated in its source system.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / category / description
      Added value: +"Free topical label (default 'general')"
    • addedInput schema / properties / content / description
      Added value: +"Text content of the memory item"
    • addedInput schema / properties / name / description
      Added value: +"Name of the AI memory item"
    • addedInput schema / properties / source / description
      Added value: +"Where the fact comes from (optional provenance)"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and idempotentHint=false, and the description adds genuinely new behavior: key-based upsert scoped per (entity+entity_id+agent_id+brain_id), the fact that the result reports which scope was written, and that an agent writing its own memory is never parked for approval. Not disclosed is why destructiveHint=true on a create, or what a non-key write does to prior records beyond 'appending'; note the mild tension with idempotentHint=false, which the description resolves only implicitly via the conditional key.

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 the required parameters and the scoping rule, with the lengthy durable-rule recipe deferred to the end where it belongs. It is dense with parentheticals, quoted German, and capitalized emphasis ('DURABLE RULE', 'PER SCOPE'), which costs some readability but each block carries distinct 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?

For a 12-parameter mutation tool with no output schema, the description covers the hard parts: scope algebra, key semantics, defaults, and the approval behavior. One gap: it enumerates entity only as lead|contact|account|campaign while the schema also permits user, asbest_project, and raumbuchung_booking, leaving an agent unsure whether those values are supported in this flow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description goes well past it: it explains how entity/entity_id and brain_id/agent_id compose ('AND/OR'), that key uniqueness is per-scope so the same key on two leads yields two items, that importance drives ranking, and that parent_id is a legacy alias. That relational meaning is absent from the per-parameter schema text.

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?

Opens with a specific verb+resource ('Save an AI memory item') and immediately separates itself from siblings by explaining the key-based upsert path ('update the same fact instead of appending'), which is what distinguishes create_ai_memory_item from update_ai_memory_item. The scoping model (entity+entity_id AND/OR brain_id+agent_id) is stated concretely enough that an agent can pick this tool without opening the 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?

Gives explicit when-to-use guidance for the two memory modes (CRM record scope vs agent 'brain' scope) and a concrete recipe for the durable-rule case, including exact field values. It does not explicitly name or exclude the sibling write tools (update_ai_memory_item, delete_ai_memory_item), so the agent must infer the boundary from the upsert remark rather than from a stated alternative.

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.