Skip to main content
Glama
0Mattias
by 0Mattias

memory_audit_turn

Audits a conversation turn to detect silent memory retrieval misses, running a search probe and comparing against actual memory lookups within a time window. Returns a MissReport when high-relevance hits are overlooked.

Instructions

Not for in-conversation use. This tool is dispatched by the client's end-of-turn Stop hook; the model should never call this directly.

Silent-miss telemetry (full reference in docs/api.md). Runs the search probe memory_search would have run for user_message (assistant_response optional), then checks whether a memory_search, memory_show, or memory_list event fired in the same session within lookback_seconds (default 60). A high-relevance probe hit with no retrieval in that window is a miss. Auto-scopes to the caller's repo so the probe matches the model's view; honours session-disabled scopes. Returns a MissReport with verdict in {'miss', 'ok', 'no_signal'} plus the top probe hits. Side-effects: emits turn_audited always, plus search_miss when the verdict is miss.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_messageYes
lookback_secondsNo
assistant_responseNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses several behavioral traits: it auto-scopes to the caller's repo, honours session-disabled scopes, emits 'turn_audited' always and 'search_miss' on a miss, and returns a MissReport with specific verdict values. It lacks some details like exact rate limits or persistence behavior, but covers the main side-effects and conditions well.

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 well-structured, with a clear initial warning, then a logical flow from probe mechanics to verdict definition to side-effects. Every sentence adds value, and the key 'do not call' guidance is front-loaded. It avoids redundancy and remains under ~150 words while packing substantial detail.

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 tool's purpose (an internal telemetry hook) and the presence of an output schema, the description fully covers the tool's role, trigger conditions, parameters, side-effects, and return values. It also references docs/api.md for full details, which is appropriate. The tool is complex because it involves event history and scoping, but the description explains these aspects sufficiently for an agent to understand when it would be invoked and what it does.

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 0%, so the description must compensate. It explains that user_message is required, assistant_response is optional, and lookback_seconds has a default of 60. However, it doesn't elaborate on types or format beyond schema defaults. The description adds semantic meaning (e.g., 'lookback_seconds' default) but doesn't fully define edge cases like what happens if lookback_seconds is null, so it partially compensates.

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 the tool's purpose: it runs a search probe to detect 'silent-miss' telemetry, comparing whether memory retrieval events occurred within a lookback window. It names the specific verb/action ('runs the search probe'), the resource ('memory_search'), and the output ('MissReport'), and it distinguishes itself from sibling tools like memory_search by explicitly stating it is not for in-conversation use and is dispatched by an end-of-turn Stop hook.

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 opens with an explicit do-not-call directive: 'Not for in-conversation use... the model should never call this directly.' It explains when the client's Stop hook dispatches it, which clearly separates it from the sibling memory tools. It also notes optional parameters (assistant_response optional) and auto-scoping behavior, giving concrete guidance on how the tool is triggered and what conditions produce a miss.

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/0Mattias/bettermemory'

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