Skip to main content
Glama

mem_context

Retrieve bounded, handoff-first continuity for AI coding agents: fetch project or session context to recall architecture decisions, patterns, and fixes across sessions.

Instructions

Build bounded handoff-first continuity. project_key is always required. Supply both root_session_key and harness for session context, or omit both for project context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
harnessNoNative harness for root_session_key; supply both for session context, or omit both for project context.
project_keyYesExact 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.
budget_charsNo
correlation_idNo
finalize_answerNo
root_session_keyNoOptional verified root session key; supply with harness for session context, or omit both for project context.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. Addedv0.4.13
  3. Removedv0.4.1
  4. First observedv0.3.7

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Build' suggests some construction/side effect, but the description never says whether this reads or writes, what gets persisted, whether auth is required, or how budget_chars bounds output. Only the parameter pairing rule is disclosed.

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?

Three short sentences, front-loaded with purpose and immediately followed by the required-parameter and mode rules. Efficient, with only the opening jargon phrase costing clarity.

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 6-parameter tool with no annotations and no output schema, the description covers only the identity params. It says nothing about budget_chars, correlation_id, finalize_answer, or the shape of what comes back, so an agent cannot call it confidently.

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

Parameters2/5

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

At 50% schema coverage, the description must compensate, and it only reinforces project_key (always required) and the root_session_key/harness pairing – both already documented in the schema. budget_chars, correlation_id, and finalize_answer receive no explanation in either place, leaving half the surface opaque.

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 verb+object phrase 'Build bounded handoff-first continuity' conveys a sense of producing continuity context, but 'bounded handoff-first continuity' is jargon that never plainly states what the tool actually returns or does. Nothing distinguishes it from siblings like mem_session, mem_project, or mem_recall.

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 does specify a mode rule: supply both root_session_key and harness for session context, or omit both for project context. But this is parameter-shape guidance, not tool-selection guidance – it never says when to reach for mem_context over mem_recall or mem_session, so usage is only implied.

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