Skip to main content
Glama

memory_store_session

Store a full multi-turn conversation as one memory unit so agents can preserve context and retrieve entire sessions reliably instead of isolated turns.

Instructions

Store a full conversation session as a single memory unit.

Use this instead of memory_store when you want to preserve the full context of a multi-turn conversation. All turns are stored together, making session-level retrieval more reliable than storing individual turns separately.

Example: { "turns": [ {"role": "user", "content": "How do I configure Redis?"}, {"role": "assistant", "content": "Set REDIS_URL in your .env file..."} ], "session_id": "optional-stable-id", "tags": "redis,configuration" }

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": {
      "turns": "<turns>"
    },
    "name": "memory_store_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoAdditional tags (comma-separated string or array). 'session:<id>' is always added automatically.
storeNoTarget store partition (default: 'default'). Use 'docs' for documents, 'all' for cross-store search.
turnsYesOrdered list of conversation turns.
agent_idNoOptional authoring agent id. Falls back to the X-Agent-ID header, then MCP_AGENT_ID. Passing it here makes the caller's author win over the server default.
metadataNoOptional extra metadata.
session_idNoOptional stable identifier for this session. Auto-generated UUID if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations supply only destructiveHint=false, so the description carries most of the behavioral burden. It does disclose the key trait that all turns are persisted together as one unit, but it says nothing about what happens when session_id already exists (overwrite, duplicate, or merge), what permissions or auth are required, or what identifier comes back. Those are meaningful gaps for a write tool.

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 guidance is front-loaded in two short sentences followed by a worked example, which is efficient and useful for a nested-object parameter. The example is somewhat long relative to the prose, but it earns its space by demonstrating the turns structure that is otherwise verbose in JSON schema.

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 six-parameter write tool with nested objects and no output schema, the description covers purpose, alternative routing, and input shape. It leaves out the behavior on repeated session_id, the return value, and how the store/agent_id defaults interact, which are the details an agent most needs before calling it in a retry or duplicate scenario.

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 the baseline is 3. The embedded example illustrates the shape of the nested turns array and shows session_id and tags in use, which adds marginal clarity beyond the schema, but the description does not explain semantics the schema leaves open, such as the store partition values or the auto-generated session tag.

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?

The first sentence gives a specific verb and resource: 'Store a full conversation session as a single memory unit.' It also distinguishes the tool from the sibling memory_store by framing it as session-level rather than turn-level, so an agent can tell the two apart 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit selection guidance: 'Use this instead of memory_store when you want to preserve the full context of a multi-turn conversation,' plus a stated rationale that session-level retrieval is more reliable than storing turns individually. The alternative and the condition that selects it are both named.

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