Skip to main content
Glama

Build XMemo context

recall_context
Read-onlyIdempotent

Build a read-only, bounded context pack from multiple relevant memories for answers needing several items or scoped/path-filtered context. Limit by item and token budgets and report omitted memories.

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

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'). Set 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). Relative and natural language time expressions are given as absolute timestamps in the user's local time. 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). Set this 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). Natural language end bounds are given as absolute timestamps with timezone offsets. 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'. Set 'activity_log' for event feeds within a bounded [since, until) window; set 'topic' for topic retrieval. 'activity_log' requires explicit bounded 'since' and 'until' timestamps. 'activity_log' without bounds fails closed; explicit 'topic' blocks stream bypass.
time_orderNoSort order for returned memories: 'desc' (newest first) or 'asc' (oldest first). Set 'desc' when the user asks for 'latest', 'recent', 'newest first', or recency, or 'asc' for chronological order ('oldest first') in any language. 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 hypothetical answer or semantic expansion of the query, used to improve matching.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.197
    • changedInput schema / properties / hypothetical_answer / description
      Previous value: -"Optional multilingual hypothetical answer or dense semantic expansion written by the calling LLM for this query."New value: +"Optional hypothetical answer or semantic expansion of the query, used to improve matching."
    • changedInput schema / properties / query_mode / description
      Previous value: -"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."New value: +"Optional query intent: 'topic' (default) or 'activity_log'. Set 'activity_log' for event feeds within a bounded [since, until) window; set 'topic' for topic retrieval. 'activity_log' requires explicit bounded 'since' and 'until' timestamps. 'activity_log' without bounds fails closed; explicit 'topic' blocks stream bypass."
    • changedInput schema / properties / since / description
      Previous value: -"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."New value: +"RFC 3339 timestamp with timezone offset (e.g., '2026-09-01T00:00:00+09:00'). Set 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). Relative and natural language time expressions are given as absolute timestamps in the user's local time. If omitted, the server falls back to heuristic guessing which may misinterpret timezone day boundaries or relative dates."
    • changedInput schema / properties / time_order / description
      Previous value: -"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."New value: +"Sort order for returned memories: 'desc' (newest first) or 'asc' (oldest first). Set 'desc' when the user asks for 'latest', 'recent', 'newest first', or recency, or 'asc' for chronological order ('oldest first') in any language. If omitted and since/until are omitted, default relevance ranking is used without temporal sorting."
    • changedInput schema / properties / until / description
      Previous value: -"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."New value: +"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). Set this 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). Natural language end bounds are given as absolute timestamps with timezone offsets. If omitted, the window is open-ended on the upper side or derived heuristically."
  2. 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"
      +}
  3. 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"
  4. First observedv0.4.176

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior: output is bounded, over-budget memories are omitted and reported, and the remedy is raising max_tokens or switching to recall. It does not mention other edge behaviors such as the activity_log fail-closed case, but those are handled by the schema.

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 no waste: purpose first, routing second, budget semantics third. Every sentence carries decision-relevant information for an agent.

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 21-parameter tool, the description covers the decision axes an agent needs: when to choose it, which siblings to prefer, and how output bounding works. The schema and the output schema carry the remaining parameter and return-value detail.

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?

Schema coverage is 100%, so the baseline is 3. The description goes beyond the schema by explaining the practical consequence of max_items/max_tokens: what gets dropped and how it is reported, which helps an agent set those two budgets correctly.

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 states a specific verb and resource ('Build a read-only, bounded context pack from multiple relevant memories') and explicitly contrasts it with sibling tools ('recall' for quick lookup, 'get_project_context' for a whole-project snapshot). An agent can pick this tool 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?

It names the when-to-use condition ('when an answer needs several memory items or scoped/path-filtered context') and names both alternatives with the conditions that favor them. It also gives an escalation path when results are truncated ('raise max_tokens or use recall').

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