Skip to main content
Glama

trw_recall

Retrieve prior engineering learnings relevant to your current task by searching with keywords and filtering by tags, impact, or status.

Instructions

Retrieve prior learnings relevant to your current task.

Use when:

  • You are about to work in an unfamiliar area of the codebase.

  • You suspect a bug has been seen before and want prior root-cause notes.

  • You want a narrow tag/impact slice before spawning a subagent.

See Also: trw_learn, trw_session_start.

Results are ranked by combined relevance (query match on summary/tags/detail) and utility (impact, type-aware recency decay, prior feedback). Context boosts prioritize entries matching your current domain, phase, and team.

Output: RecallResultDict with fields {learnings: list[{id, summary, detail?, tags, impact, ...}], count: int, query: str, ceremony_hint?: str}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoOptional tag filter — only return entries matching these tags.
as_ofNoOptional ISO-8601 instant (PRD-CORE-194). Time-travel recall — returns records whose validity window contained T. Malformed values raise a clean validation error. Default None = open records only.
queryNoSearch query (keywords matched against summaries/details). Use "*" to list all (auto-enables compact mode).
topicNoOptional topic slug from knowledge topology. When provided, only returns learnings belonging to that topic cluster.
statusNoOptional status filter — 'active', 'resolved', or 'obsolete'.active
compactNoWhen True, return only essential fields per learning. When None (default), auto-enables for wildcard queries.
shard_idNoOptional shard identifier for receipt attribution.
min_impactNoMinimum impact score filter (0.0-1.0). Use 0.7 for high-impact only.
max_resultsNoMaximum learnings to return (default 25, 0 = unlimited).
token_budgetNoOptional max token ceiling for the serialized result. Must be > 0. When omitted, a sane default cap is applied so a recall can never overflow the context window (anti-collapse guard).
include_tiersNoOptional tier scope (PRD-CORE-185). Project entries are ALWAYS included; this flag only controls whether machine-local USER-tier entries are added on top. None (default) and any list containing "user" federate the user tier when a user-scope store is present; ["project"] (no "user") restricts to project-only. A user-only query is intentionally not expressible -- the project tier is the local source of truth and is never excluded.
ultra_compactNoWhen True, return only ``{learnings, count, ceremony_hint}`` with each learning reduced to ``{id, summary}``.
include_supersededNoWhen True, also return superseded records, ranked strictly below open ones (each flagged superseded/invalidated_by).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
queryNo
compactNo
contextNoShape of the context dict returned by ``collect_context()`` and embedded in ``RecallResultDict``. Both keys are optional — populated only when the corresponding YAML file exists in the ``.trw/context/`` directory.
patternsNo
learningsNo
max_resultsNo
tokens_usedNo
ceremony_hintNo
tokens_budgetNo
total_matchesNo
total_availableNo
tokens_truncatedNo
duplicates_collapsedNo
topic_filter_ignoredNo
topic_filter_warningNo
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses ranking logic (relevance, utility, context boosts), time-travel recall, auto-compact for wildcards, anti-collapse guard, tier inclusion behavior, and output shape. This is comprehensive for a retrieval tool.

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 concisely structured: purpose sentence, bulleted use cases, ranking explanation, output format. Every sentence adds value with no redundancy.

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?

Given the complexity (13 parameters, output schema exists), the description covers purpose, usage, ranking, and output. It is complete for an agent to decide when and how to use the tool effectively.

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 baseline is 3. The main description adds contextual insight (e.g., ranking, compact mode auto-enable) but does not significantly extend parameter semantics beyond the already thorough schema descriptions.

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 clearly states 'Retrieve prior learnings relevant to your current task,' which is a specific verb+resource. It distinguishes from siblings by mentioning 'See Also: trw_learn, trw_session_start' and providing unique use-case bullets.

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?

The description explicitly lists three when-to-use scenarios (unfamiliar area, suspected recurring bug, narrow slice before subagent) and mentions alternative tools. This provides clear guidance on appropriate contexts.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wallter/trw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server