Skip to main content
Glama

Store session context

store_context

Records the outcome of a session to the user's NC memory, so that later sessions can recall it. summary and context are composed by the caller from the conversation itself; they are not collected from the user. All three core fields are required, and storage is cheap — more detail retrieves better than less.

WHAT IS WORTH RECORDING: a session that produced something a later session would otherwise have to reconstruct — a decision and the reasoning behind it, a fix and why it worked, a constraint discovered, a piece of state that changed. A session that only answered a self-contained question leaves nothing to recall. Recall returns what earlier sessions stored and nothing else, so an outcome that is never recorded here is not available to any later session.

FIELDS:

  • summary: what was asked and what was decided. 50-75 tokens max. One tight paragraph.

  • user_query: the user's VERBATIM opening question or request, copied exactly — full text, no truncation. Future recall matches against the user's own words, not only the summary.

  • context: full detail of the conversation — decisions, code, configs, errors, reasoning. Target 2000–8000 tokens: enough that a reader six months from now needs no follow-up. Technical details, file paths, error messages and CLI commands belong here untruncated.

  • conversation_id: matches the id used for recall_context in the same session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextYesFull technical detail of the conversation. Target 2000-8000 tokens. Do not compress or truncate. Storage is cheap.
personaNo
summaryYesWhat was asked and what was decided. 50-75 tokens max. Plain prose. Do not include code or raw output here.
billableNo
user_queryNoThe user's original question or request, verbatim. Full text, no truncation. Used for future recall matching against the user's own words.
artifact_urlNoURL to an artifact associated with this memory. Format: nc-doc://[document_id] or https URL.
client_projectNo
company_clientNo
conversation_idYesThread identifier — must match the one used in recall_context this session.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoPresent on a fresh store.
errorNoPresent when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`.
messageNo
successYes
memory_idNoOn a deduplicated store: the existing memory's id.
deduplicatedNoTrue when identical content was stored by this caller inside the dedup window; `memory_id` then names the EXISTING memory and nothing new was written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "description": "Present on a fresh store.",
      +      "properties": {
      +        "client_project": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "company_client": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "conversation_id": {
      +          "type": "string"
      +        },
      +        "memory_id": {
      +          "type": "string"
      +        },
      +        "persona": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "persona_hint": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "shortcode": {
      +          "description": "Short human-readable reference for the stored memory.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "deduplicated": {
      +      "description": "True when identical content was stored by this caller inside the dedup window; `memory_id` then names the EXISTING memory and nothing new was written.",
      +      "type": "boolean"
      +    },
      +    "error": {
      +      "description": "Present when the call did not succeed. An object carries `type` and `message` (and often a `timestamp`); Utils.formatError bodies set it to `true` with the reason in the top-level `message`.",
      +      "type": [
      +        "object",
      +        "boolean",
      +        "string"
      +      ]
      +    },
      +    "memory_id": {
      +      "description": "On a deduplicated store: the existing memory's id.",
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations carry the safety profile (readOnlyHint=false, destructiveHint=false, no contradiction). The description adds valuable behavioral context beyond the annotations: storage is cheap so more detail retrieves better, recall returns only what earlier sessions stored, and the caller composes summary/context from the conversation rather than from the user. This helps the agent reason about side effects and persistence without contradicting the structured data.

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?

Well-structured with clear section headers ('WHAT IS WORTH RECORDING', 'FIELDS') that make scanning easy. The description is long but every section earns its place — the field documentation adds genuine guidance rather than padding. Slightly more verbose than strictly necessary, but the structure mitigates this.

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 9-parameter memory-persistence tool, the description covers the core purpose, usage criteria, and field semantics thoroughly, and an output schema exists to handle return values. The optional metadata fields are not documented, but they are self-explanatory. The description gives the agent everything needed to record a session correctly.

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?

With 56% schema coverage, the description compensates meaningfully. It documents summary (50-75 tokens, one tight paragraph), user_query (verbatim, no truncation, matched against the user's own words), context (2000-8000 tokens, technical details untruncated), and conversation_id (must match recall_context). This goes beyond the schema by explaining the why behind each field. Undocumented params (persona, billable, artifact_url, client_project, company_client) are self-descriptive metadata fields, so the gap is acceptable.

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-resource pair — 'Records the outcome of a session to the user's NC memory, so that later sessions can recall it.' This clearly distinguishes it from sibling readers like recall_context and search_memories, and the description explicitly contrasts it: 'Recall returns what earlier sessions stored and nothing else.' The agent can immediately tell what this tool is for and what it is not.

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?

Provides explicit when-to-use criteria under 'WHAT IS WORTH RECORDING' — a session that produced something a later session would reconstruct (decision+reasoning, fix+why, constraint, state change), and explicitly states when NOT to use it: 'A session that only answered a self-contained question leaves nothing to recall.' This is direct usage guidance with a clear exclusion rule.

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