Skip to main content
Glama

Build XMemo context

recall_context
Read-onlyIdempotent

Combine relevant memories into a read-only context pack when an answer needs multiple items or scoped paths. Bound size with item/token limits; omitted memories are reported.

Instructions

Build a read-only, bounded context pack from multiple relevant memories. Use it when an answer needs several memory items or scoped/path-filtered context; use recall for a quick best-effort lookup or get_project_context for a whole-project snapshot. max_items/max_tokens bound output: memories that do not fit are omitted and reported, so raise max_tokens or use recall when you need the records themselves.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoCandidate-result limit; 0 derives it from the item/token budgets.
queryYesNatural-language query used to rank memories for the context pack.
scopeNoOptional authorized scope; blank uses the token default.
sinceNoRFC 3339 timestamp with timezone offset (e.g., '2026-09-01T00:00:00+09:00'). Trigger: Call this whenever the user query mentions any relative or absolute time constraint in any language (e.g., today, yesterday, last week, last month, recently, Aug 1, Aug 10 to Sep 1, since Monday, before Sep 15, in Q3). Model responsibility: You (the calling LLM) know current date and user local time, so you must convert natural language time expressions into absolute timestamps. Consequence: If omitted, the server falls back to heuristic guessing which may misinterpret timezone day boundaries or relative dates.
untilNoRFC 3339 timestamp with timezone offset (e.g., '2026-09-02T00:00:00+09:00'). When used with since, defines the half-open interval [since, until) with until > since (maximum 90 days span). Trigger: Pass when the user query specifies an end date or bounded window in any language (e.g., yesterday end of day, by Aug 10, Aug 10 to Sep 1). Model responsibility: Convert natural language end bounds into absolute timestamps with timezone offsets. Consequence: If omitted, the window is open-ended on the upper side or derived heuristically.
bucketNoAccessible bucket filter; % includes all accessible buckets.%
team_idNoOptional exact authorized team filter.
agent_idNoOptional client-supplied agent label for memory attribution.
max_itemsNoMaximum memories rendered in the context pack.
max_tokensNoApproximate token budget for the rendered context pack.
query_modeNoOptional query intent: 'topic' (default) or 'activity_log'. Trigger: Set 'activity_log' for event feeds within a bounded [since, until) window; set 'topic' for topic retrieval. Model responsibility: 'activity_log' requires explicit bounded 'since' and 'until' timestamps. Consequence: 'activity_log' without bounds fails closed; explicit 'topic' blocks stream bypass.
time_orderNoSort order for returned memories: 'desc' (newest first) or 'asc' (oldest first). Trigger: Pass 'desc' when the user asks for 'latest', 'recent', 'newest first', or recency, or 'asc' for chronological order ('oldest first') in any language. Model responsibility: Explicitly set desired temporal ordering when the user expresses recency intent. If omitted and since/until are omitted, default relevance ranking is used without temporal sorting.
memory_typeNoMemory type filter; auto searches the normal mixed set.auto
output_jsonNoTrue returns the full structured pack; false returns rendered context text.
path_filterNoCase-insensitive memory-path pattern; % matches all paths.%
owner_timezoneNoThe user's real IANA timezone, such as Asia/Tokyo or America/Los_Angeles. Required for honest calendar periods; never guess UTC.
prefer_workingNoTrue prioritizes active working/session-state signals.
reference_timeNoOptional ISO 8601 reference time snapshot for deterministic evaluation. Leave blank to use the real clock; setting this does not replace owner_timezone for calendar day boundaries.
agent_instance_idNoOptional stable, non-secret agent instance ID for per-client attribution.
temporal_axis_modeNoOptional temporal axis resolution policy: 'created_at' (Scheme A), 'updated_at' (Scheme B), or 'split_filter_created_order_updated' (Scheme C).
hypothetical_answerNoOptional multilingual hypothetical answer or dense semantic expansion written by the calling LLM for this query.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.4.186
    • addedInput schema / properties / hypothetical_answer
      Added value: +{
      +  "default": "",
      +  "description": "Optional multilingual hypothetical answer or dense semantic expansion written by the calling LLM for this query.",
      +  "type": "string"
      +}
    • changedInput schema / properties / max_tokens / default
      Previous value: -1500New value: +8000
    • addedInput schema / properties / owner_timezone
      Added value: +{
      +  "default": "",
      +  "description": "The user's real IANA timezone, such as Asia/Tokyo or America/Los_Angeles. Required for honest calendar periods; never guess UTC.",
      +  "type": "string"
      +}
    • addedInput schema / properties / query_mode
      Added value: +{
      +  "default": "",
      +  "description": "Optional query intent: 'topic' (default) or 'activity_log'. Trigger: Set 'activity_log' for event feeds within a bounded [since, until) window; set 'topic' for topic retrieval. Model responsibility: 'activity_log' requires explicit bounded 'since' and 'until' timestamps. Consequence: 'activity_log' without bounds fails closed; explicit 'topic' blocks stream bypass.",
      +  "type": "string"
      +}
    • addedInput schema / properties / reference_time
      Added value: +{
      +  "default": "",
      +  "description": "Optional ISO 8601 reference time snapshot for deterministic evaluation. Leave blank to use the real clock; setting this does not replace owner_timezone for calendar day boundaries.",
      +  "type": "string"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "default": "",
      +  "description": "RFC 3339 timestamp with timezone offset (e.g., '2026-09-01T00:00:00+09:00'). Trigger: Call this whenever the user query mentions any relative or absolute time constraint in any language (e.g., today, yesterday, last week, last month, recently, Aug 1, Aug 10 to Sep 1, since Monday, before Sep 15, in Q3). Model responsibility: You (the calling LLM) know current date and user local time, so you must convert natural language time expressions into absolute timestamps. Consequence: If omitted, the server falls back to heuristic guessing which may misinterpret timezone day boundaries or relative dates.",
      +  "type": "string"
      +}
    • addedInput schema / properties / temporal_axis_mode
      Added value: +{
      +  "default": "",
      +  "description": "Optional temporal axis resolution policy: 'created_at' (Scheme A), 'updated_at' (Scheme B), or 'split_filter_created_order_updated' (Scheme C).",
      +  "type": "string"
      +}
    • addedInput schema / properties / time_order
      Added value: +{
      +  "default": "",
      +  "description": "Sort order for returned memories: 'desc' (newest first) or 'asc' (oldest first). Trigger: Pass 'desc' when the user asks for 'latest', 'recent', 'newest first', or recency, or 'asc' for chronological order ('oldest first') in any language. Model responsibility: Explicitly set desired temporal ordering when the user expresses recency intent. If omitted and since/until are omitted, default relevance ranking is used without temporal sorting.",
      +  "type": "string"
      +}
    • addedInput schema / properties / until
      Added value: +{
      +  "default": "",
      +  "description": "RFC 3339 timestamp with timezone offset (e.g., '2026-09-02T00:00:00+09:00'). When used with since, defines the half-open interval [since, until) with until > since (maximum 90 days span). Trigger: Pass when the user query specifies an end date or bounded window in any language (e.g., yesterday end of day, by Aug 10, Aug 10 to Sep 1). Model responsibility: Convert natural language end bounds into absolute timestamps with timezone offsets. Consequence: If omitted, the window is open-ended on the upper side or derived heuristically.",
      +  "type": "string"
      +}
  2. Changed27 schema fields changedv0.4.179
    • removedInput schema / properties / agent_id / title
      Removed value: -"Agent Id"
    • removedInput schema / properties / agent_instance_id / title
      Removed value: -"Agent Instance Id"
    • changedInput schema / properties / bucket / description
      Previous value: -"Memory bucket or namespace to read from or write to; use % only for tools that support wildcard reads."New value: +"Accessible bucket filter; % includes all accessible buckets."
    • removedInput schema / properties / bucket / title
      Removed value: -"Bucket"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results to return."New value: +"Candidate-result limit; 0 derives it from the item/token budgets."
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • changedInput schema / properties / max_items / description
      Previous value: -"Maximum number of memory items to include."New value: +"Maximum memories rendered in the context pack."
    • removedInput schema / properties / max_items / title
      Removed value: -"Max Items"
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Approximate maximum response size."New value: +"Approximate token budget for the rendered context pack."
    • removedInput schema / properties / max_tokens / title
      Removed value: -"Max Tokens"
    • changedInput schema / properties / memory_type / description
      Previous value: -"Memory type/category filter or value, such as episodic, identity, procedural, semantic, working, auto, or %."New value: +"Memory type filter; auto searches the normal mixed set."
    • removedInput schema / properties / memory_type / title
      Removed value: -"Memory Type"
    • changedInput schema / properties / output_json / description
      Previous value: -"Return a machine-readable JSON response instead of a human-readable summary."New value: +"True returns the full structured pack; false returns rendered context text."
    • removedInput schema / properties / output_json / title
      Removed value: -"Output Json"
    • changedInput schema / properties / path_filter / description
      Previous value: -"Memory path filter; % matches all paths."New value: +"Case-insensitive memory-path pattern; % matches all paths."
    • removedInput schema / properties / path_filter / title
      Removed value: -"Path Filter"
    • changedInput schema / properties / prefer_working / description
      Previous value: -"Whether to prioritize working/session-state memories in retrieval."New value: +"True prioritizes active working/session-state signals."
    • removedInput schema / properties / prefer_working / title
      Removed value: -"Prefer Working"
    • changedInput schema / properties / query / description
      Previous value: -"Natural-language question or search text."New value: +"Natural-language query used to rank memories for the context pack."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • changedInput schema / properties / scope / description
      Previous value: -"Optional scope that narrows memory access; leave blank for the token default."New value: +"Optional authorized scope; blank uses the token default."
    • removedInput schema / properties / scope / title
      Removed value: -"Scope"
    • changedInput schema / properties / team_id / description
      Previous value: -"Optional team/workspace identifier for team-scoped memory access."New value: +"Optional exact authorized team filter."
    • removedInput schema / properties / team_id / title
      Removed value: -"Team Id"
    • removedInput schema / title
      Removed value: -"recall_contextArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"recall_contextOutput"
  3. First observedv0.4.176

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds genuinely non-obvious behavior on top: 'memories that do not fit are omitted and reported, so raise max_tokens or use recall when you need the records themselves.' This discloses a truncation-with-reporting trait that annotations cannot express.

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?

Three sentences with zero waste: purpose first, usage routing second, behavioral caveat third. Every sentence earns its place and the most decision-relevant information (what it does, when to pick it) is front-loaded.

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 21-parameter tool, the definition is complete for selection and invocation: output schema exists, so return values need no explanation, and the schema covers all parameter semantics at 100%. A small gap is that the description never mentions the structured-vs-rendered output option (output_json) or time-window capabilities, though these are well covered in the schema itself.

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 of 3 applies; the schema's parameter descriptions are unusually rich, with trigger conditions and model responsibilities for each field. The main description adds only marginal parameter context by tying max_items/max_tokens to the omission-and-report behavior. It correctly does not duplicate the schema's work.

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 uses a specific verb+resource pair ('Build a read-only, bounded context pack from multiple relevant memories') and immediately distinguishes itself from siblings: 'use recall for a quick best-effort lookup or get_project_context for a whole-project snapshot.' An agent can tell this tool apart from its nearest alternatives without opening the 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 when-to-use criteria are given ('when an answer needs several memory items or scoped/path-filtered context') along with named alternatives and the conditions that route to them ('use recall for a quick best-effort lookup'). The guidance is actionable and leaves nothing to inference.

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