Skip to main content
Glama

Create AI memory item

create_ai_memory_item

Save an AI memory note. Scope: no entity → tenant-wide; entity_type only → about that whole entity type; entity_type + entity_id → about one specific record (customer, product, project, machine, …). Optionally scope to a brain/agent and set importance (1-5) or a mem_key for later upsert via save semantics.

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

Input Schema

NameRequiredDescriptionDefault
nameYesShort title for the note
mem_keyNoOptional stable handle — if set and a row with the same (agent_id, brain_id, mem_key) exists, it is UPDATED instead of duplicated
agent_idNoOptional: private to this agent (omit = shared across the tenant's agents)
brain_idNoOptional: the brain (category) this memory belongs to
entity_idNoOptional specific record UUID (requires entity_type)
importanceNo1-5, default 3
descriptionYesThe note body
entity_typeNoOptional entity type this note is about

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the mutation safety profile is covered. The description adds real value by disclosing the mem_key upsert exception (a duplicate-suppressing write path that sits slightly at odds with the blanket non-idempotent hint). It does not say what is returned or whether the write is scoped by tenant permissions.

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?

A single dense paragraph with the core action front-loaded and the scoping rules ordered from broadest to narrowest. Every clause (scope cases, importance, mem_key upsert) carries information an agent would otherwise have to infer.

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 an 8-parameter mutation tool with no output schema, the description covers the decisions that matter: scope, agent/brain targeting, and upsert behavior. Missing only the return shape and any permission/prerequisite note, which the annotations partially offset.

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 goes beyond the schema by explaining the consequence of omitting entity fields (tenant-wide visibility) and of combining entity_type with entity_id (single record). It restates importance 1-5 and mem_key semantics that the schema already covers, which keeps it from a 5.

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 and resource ('Save an AI memory note') and immediately follows with the scoping model, so an agent can distinguish it from update/delete/list siblings without opening a 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 context by enumerating the three scope cases (tenant-wide, entity-type-wide, single record) and notes mem_key for later upsert. It stops short of naming update_ai_memory_item as the preferred path for editing an existing note, so alternatives are only implied.

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