Skip to main content
Glama

Likely-prompt queries for saved facts

memory_queries

Generate likely user prompts for saved facts so recall matches real queries; list facts missing queries or store up to 8 prompts per fact.

Instructions

Write, or list the facts that still lack, the likely-prompt queries recall matches a user's prompt against — for each fact, the prompts a user would type when that fact is what they need. Call it with {} at the end of a session that saved facts, or when bantamkit_status reports queries: n of m facts with n below m: it answers up to 10 facts with no queries yet (layer, name, description, a body excerpt), the writing instructions, and remaining. Then call it with {"facts": [{name, layer?, queries}]} to store what you wrote. Every item is checked before anything is written and the first bad one refuses the whole call — an unknown name or layer, more than 8 queries, one over 200 characters; queries: [] removes a fact's entry. No fact file changes: queries live in a per-layer sidecar under ~/.bantamkit/queries/, keyed to the fact's content, so a fact edited later is listed as missing again. memory_save takes queries directly for a fact you are saving now; this tool is for facts already on disk.

Input Schema

NameRequiredDescriptionDefault
factsNoOmit to list the facts missing queries

Output Schema

NameRequiredDescriptionDefault
factsNoWith `missing`: up to 10 {layer, name, description, body} still without queries.
reasonNoWith result `error`: one sentence saying why the call was refused.
resultYes`missing` for the list call, `written` for the store call, `error` with `reason` when refused.
writtenNoWith `written`: how many items were stored.
remainingNoHow many facts across the readable layers still have no queries after this call.
instructionsNoWith `missing`: how to write good queries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.37.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing all-or-nothing validation (the first bad item refuses the whole call), the specific rejection reasons, that no fact files are modified, that queries live in a per-layer sidecar keyed to fact content, and the consequence that an edited fact is re-listed as missing. It also states the batch cap of 10 facts and what the listing returns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the what and when, then the write mode and constraints; every clause is informative. It is a single long run-on paragraph with an awkward opening clause and some repetition of limits already in the schema, which costs readability.

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?

An output schema exists, yet the description still tells the agent what the listing returns (layer, name, description, excerpt, instructions, `remaining`), plus the validation failure modes and the sidecar lifecycle. Nothing needed to call it correctly in either mode is missing.

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 still adds meaning the schema does not, such as the 10-fact listing cap, the fact that the listing includes body excerpts and `remaining`, and the semantics of `queries: []` as removal. It restates some limits (8 queries, 200 chars) already in the schema, so it is additive but not fully non-redundant.

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 pair (write / list) and a precise resource (likely-prompt queries attached to saved facts), and explains the concept in-line: the prompts a user would type when that fact is what they need. It explicitly contrasts itself with the sibling memory_save, so an agent can route between them without opening either 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?

Gives concrete trigger conditions: call with {} at the end of a session that saved facts, or when bantamkit_status reports `queries: n of m facts` with n below m; then call with {facts: [...]} to store results. It also names the alternative path (memory_save takes `queries` directly for a fact being saved now) and scopes this tool to facts already on disk.

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