Skip to main content
Glama

Recent Retrieval Traces

memory-trace-recent

Lists recent diagnostic retrieval traces to investigate missed search results, showing whether a document was retrieved, filtered out, or dropped at a specific stage.

Instructions

List the most recent diagnostic retrieval traces. Each trace captures: query text, filters, per-stage candidate counts (corpus → vector above/below floor → keyword → final), result IDs, and total latency. Use this when investigating "why didn't you find the obvious doc" complaints — the trace shows whether the result was retrieved at all, whether it survived the floor, and which stage dropped it. Traces only persist when ENGRAM_ENABLE_RETRIEVAL_TRACES=true (default off). Returns an empty list when traces are disabled or no searches have run.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory-trace-recent"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax traces to return (default: 25, max: 200).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden, and it does well: it discloses the ENGRAM_ENABLE_RETRIEVAL_TRACES prerequisite, that the default is off, and that an empty list is returned when disabled or when no searches have run. That said, it is otherwise a simple read-only list with no auth, rate-limit, or ordering/response-shape caveats beyond what it states, so this is a solid but not exhaustive disclosure.

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, each doing distinct work: purpose plus trace contents first, then the diagnostic use case, then the operational caveat about persistence. Front-loaded with no filler and no repetition.

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?

With no output schema and no annotations, the description compensates well by enumerating the trace fields (query text, filters, per-stage candidate counts, result IDs, latency), which tells the agent what it will get back. The remaining gap is minor: nothing about ordering or the shape of an individual trace entry versus the list wrapper.

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 coverage is 100% and the single limit parameter is fully documented in the schema, so the description does not need to repeat it. The phrase "most recent" implies newest-first ordering and does add a little meaning, but no additional semantics about how limit is applied are offered, so the baseline of 3 holds.

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?

Names a specific verb and resource ("List the most recent diagnostic retrieval traces") and immediately enumerates exactly what a trace contains, so the agent knows this is a diagnostic inspection tool rather than a search tool. It is clearly distinguishable from memory-search even though no sibling is named.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete, explicit trigger: investigating "why didn't you find the obvious doc" complaints, with the diagnostic questions the trace answers. It lacks an explicit counter-case (e.g. use memory-search for normal retrieval), which keeps it short of a 5.

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