Skip to main content
Glama

mem_context

Build bounded, handoff-first continuity for AI coding agents by storing project- or session-scoped context using verified project keys and optional session identifiers.

Instructions

Build bounded handoff-first continuity. project_key required; root_session_key and harness together for session context, neither for project context.

Input Schema

NameRequiredDescriptionDefault
harnessNoVerified native harness.
project_keyYesVerified project_key, copied verbatim; never derived.
budget_charsNo
correlation_idNo
finalize_answerNo
root_session_keyNoVerified root session key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.2
    • removedInput schema / properties / project_key / minLength
      Removed value: -1
    • removedInput schema / properties / root_session_key / minLength
      Removed value: -1
  2. Changed3 schema fields changedv0.6.1
    • changedInput schema / properties / harness / description
      Previous value: -"Native harness for root_session_key; supply both for session context, or omit both for project context."New value: +"Verified native harness."
    • changedInput schema / properties / project_key / description
      Previous value: -"Exact opaque project_key copied verbatim from verified native identity; never derive it from a display name, path hint, remote, branch, worktree name, host ID, listing, or recalled content."New value: +"Verified project_key, copied verbatim; never derived."
    • changedInput schema / properties / root_session_key / description
      Previous value: -"Optional verified root session key; supply with harness for session context, or omit both for project context."New value: +"Verified root session key."
  3. Changed13 schema fields changedv0.5.6
    • addedInput schema / properties / budget_chars
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / correlation_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / finalize_answer
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / harness
      Added value: +{
      +  "description": "Native harness for root_session_key; supply both for session context, or omit both for project context.",
      +  "enum": [
      +    "opencode",
      +    "codex",
      +    "claude",
      +    "pi",
      +    "mcp",
      +    "cli",
      +    "import"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / limit
      Removed value: -{
      -  "description": "Number of observations to retrieve (default: 20)",
      -  "type": "number"
      -}
    • removedInput schema / properties / max_chars
      Removed value: -{
      -  "description": "Output character budget; 0 disables the context cap",
      -  "minimum": 0,
      -  "type": "number"
      -}
    • removedInput schema / properties / project
      Removed value: -{
      -  "description": "Filter by project name",
      -  "type": "string"
      -}
    • addedInput schema / properties / project_key
      Added value: +{
      +  "description": "Exact opaque project_key copied verbatim from verified native identity; never derive it from a display name, path hint, remote, branch, worktree name, host ID, listing, or recalled content.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / recall_query
      Removed value: -{
      -  "description": "Optional query to append fused recall evidence without changing base context sections",
      -  "type": "string"
      -}
    • addedInput schema / properties / root_session_key
      Added value: +{
      +  "description": "Optional verified root session key; supply with harness for session context, or omit both for project context.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / scope
      Removed value: -{
      -  "description": "Filter by scope",
      -  "enum": [
      -    "project",
      -    "personal"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / session_id
      Removed value: -{
      -  "description": "Filter to a specific session",
      -  "type": "string"
      -}
    • addedInput schema / required
      Added value: +[
      +  "project_key"
      +]
  4. Addedv0.4.13
  5. Removedv0.4.1
  6. First observedv0.3.7

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden. It implies a build/continuity operation but does not state whether it writes data, what side effects or permissions exist, whether it is idempotent, or what the result contains.

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 description is two compact sentences with no filler, and the required-parameter guidance is front-loaded. The only weakness is that the opening sentence is so terse and jargon-heavy that it obscures meaning.

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

Completeness2/5

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

For a six-parameter tool with no annotations and no output schema, the description is too thin. It explains the session/project context split but omits behavioral details, output expectations, and several parameter meanings.

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?

The description adds important conditional semantics for project_key, root_session_key, and harness, including the session-vs-project mode distinction. However, with only 50% schema description coverage, it leaves budget_chars, correlation_id, and finalize_answer unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description says it builds 'bounded handoff-first continuity,' which gestures at context creation but is vague jargon rather than a clear verb+resource statement. It also does not distinguish this tool from siblings such as mem_recall, mem_session, or mem_project.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It specifies project_key is required and explains that root_session_key plus harness together select session context while neither selects project context. That is useful conditional guidance, but it gives no explicit when-to-use-this-tool-vs-alternatives guidance or exclusions relative to sibling tools.

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