Skip to main content
Glama

Recall User Context

recall_user_context
Destructive

Assemble a task-aware user-context bundle from project memories, sessions, and current-state keys, with a poisoning gate that quarantines unsafe summaries and returns compact JSON.

Instructions

Assemble task-aware user context from safe claims, profile summary, repo memories, requested current-state keys, workstreams, and recent sessions. Its poisoning gate may quarantine an unsafe legacy or session summary. Requires a non-blank query and an explicit project or cwd scope. Returns a compact source-attributed JSON object with included items, dropped items, reason codes, and budget metadata. Use search for exhaustive memory matches and current_state for one exact stable key; this tool selects a bounded context bundle instead. Invalid or missing scope input and database failures return a tool error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory used to derive the project key. Required when project is omitted.
hostNoHost profile, e.g. codex-cli or claude-code.
limitNoMaximum included recall items.
queryYesTask or topic query for user-context recall.
projectNoProject key/path filter. Required when cwd is omitted.
owner_keyNoExplicit user-context owner key.
state_keysNoStable current-state keys to resolve exactly.
owner_scopeNoExplicit user-context owner scope.
task_intentNoOptional task intent, e.g. review, implement, debug, plan.
budget_charsNoMaximum compact context characters.
current_filesNoCurrent file paths relevant to the task.
include_sensitiveNoInclude personal/sensitive/restricted claims for explicit audit.
include_suppressedNoInclude policy-suppressed claims and memories for explicit audit.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo
emptyYes
queryYes
contextYes
droppedYes
projectYes
includedYes
diagnosticsYes
task_intentNo
usage_policyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.90
    • changedInput schema / properties / cwd / description
      Previous value: -"Current working directory used to derive the project key."New value: +"Working directory used to derive the project key. Required when project is omitted."
    • changedInput schema / properties / project / description
      Previous value: -"Project key/path filter. If omitted, cwd is normalized."New value: +"Project key/path filter. Required when cwd is omitted."
  2. Changed1 schema field changedv0.6.45
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "RecallCandidateCountsOutput": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "claims": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "current_state": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "dropped": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "memories": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "sessions": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "summaries": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "workstreams": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "summaries",
      +        "claims",
      +        "memories",
      +        "current_state",
      +        "workstreams",
      +        "sessions",
      +        "dropped"
      +      ],
      +      "type": "object"
      +    },
      +    "RecallDiagnosticsOutput": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "budget_chars": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "candidate_counts": {
      +          "$ref": "#/$defs/RecallCandidateCountsOutput"
      +        },
      +        "requested_limit": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "used_chars": {
      +          "format": "uint",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "requested_limit",
      +        "budget_chars",
      +        "used_chars",
      +        "candidate_counts"
      +      ],
      +      "type": "object"
      +    },
      +    "RecallDroppedItemOutput": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "label": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "reason_code": {
      +          "type": "string"
      +        },
      +        "source_id": {
      +          "format": "int64",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "source_type": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "source_type",
      +        "reason_code"
      +      ],
      +      "type": "object"
      +    },
      +    "RecallIncludedItemOutput": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "reason_codes": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "source_id": {
      +          "format": "int64",
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "source_refs": {},
      +        "source_type": {
      +          "type": "string"
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "title": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "source_type",
      +        "text",
      +        "reason_codes",
      +        "source_refs"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "context": {
      +      "type": "string"
      +    },
      +    "diagnostics": {
      +      "$ref": "#/$defs/RecallDiagnosticsOutput"
      +    },
      +    "dropped": {
      +      "items": {
      +        "$ref": "#/$defs/RecallDroppedItemOutput"
      +      },
      +      "type": "array"
      +    },
      +    "empty": {
      +      "type": "boolean"
      +    },
      +    "host": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "included": {
      +      "items": {
      +        "$ref": "#/$defs/RecallIncludedItemOutput"
      +      },
      +      "type": "array"
      +    },
      +    "project": {
      +      "type": "string"
      +    },
      +    "query": {
      +      "type": "string"
      +    },
      +    "task_intent": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "usage_policy": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "query",
      +    "project",
      +    "empty",
      +    "context",
      +    "included",
      +    "dropped",
      +    "diagnostics"
      +  ],
      +  "title": "RecallUserContextOutput",
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations declaring readOnlyHint=false and destructiveHint=true, it discloses the poisoning gate that 'may quarantine an unsafe legacy or session summary,' the compact source-attributed JSON response, and the tool-error behavior for invalid scope or database failures. This gives the agent meaningful expectations of side effects and outcomes. No contradiction with annotations.

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?

The description is dense but each sentence earns its place: what it assembles, the quarantine side effect, required inputs, return shape, sibling routing, and error behavior. It is front-loaded with the core purpose and avoids filler.

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

Completeness5/5

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

For a 13-parameter tool with an output schema and annotations covering safety characteristics, the description supplies the remaining operational context: sources, scope requirements, safety gate, response structure, and alternatives. No critical invocation detail appears to be missing.

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 input schema already documents all 13 parameters; per the calibration baseline this is a 3. The description adds a couple of cross-parameter constraints (non-blank query, project/cwd requirement) but does not systematically elaborate parameter meaning beyond the schema.

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 description opens with a specific verb and resource: 'Assemble task-aware user context' from a clear enumerated list of sources. It also differentiates itself from siblings by stating this tool selects a 'bounded context bundle' rather than exhaustive search or a single stable key.

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?

It names the alternatives explicitly: 'Use search for exhaustive memory matches and current_state for one exact stable key; this tool selects a bounded context bundle instead.' It also states the preconditions (non-blank query, explicit project or cwd scope) and error cases, so an agent knows when to call it and what to avoid.

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