Skip to main content
Glama

optimize_scan

Dump your memory corpus compactly to plan a curation pass. See curation fields, relation edges, usage counts, and anchors to check against live facts before staging changes.

Instructions

Dump the memory corpus compactly so you can plan a curation pass.

Step 1 of the "optimize my memories" workflow: every memory's curation-relevant fields, the relation edges among them, usage counts, dedup and domain hints, and per-memory anchors (URLs, paths, identifiers) to check against live facts. Read it, then stage what you decided with optimize_stage.

Start with what the store already says is suspect: due: true on a memory means its own writer dated it for a recheck and the date has passed, and source_ref says what to check it against.

recalls and stats.never_recalled are NOT that. A low count means unproven, not useless -- a memory about a rare subject looks exactly like a memory nobody wants, and the rare subject is frequently the reason the store is there. Use the aggregate to judge the STORE and never a single row: do not propose archiving something because it is unread.

The listing is slim so a big store fits one response, and a page ends early at an internal size budget -- truncated means page onward with offset + count. since limits the scan to a delta for recurring passes; full=True keeps whole bodies.

BEFORE PROPOSING ANY CHANGE, CHECK IT AGAINST LIVE FACTS, and record what you checked in each suggestion's verified. Destructive kinds are rejected without it. help(command='optimize_scan') has the rest: what every hint means, how since stays cross-window, and what "live facts" covers per memory type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNo
typeNo
limitNo
sinceNo
domainNo
offsetNo
include_archivedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does so heavily: it explains that the listing is slim, that pages can end early at an internal size budget, and that `truncated` signals continued paging. It explains hint semantics like due/source_ref and repeats a critical safety rule about verification before destructive proposals. Missing is the pagination/size mechanics spelled out precisely, but the safety and truncation behaviors are well disclosed.

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

Conciseness3/5

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

It is front-loaded with the purpose and step-1 framing, which is good, but the description is long and repetitive across paragraphs, with a mid-text all-caps warning and repeated emphasis. Some sentences earn their place; others (the recalls/stats paragraph) are defensive and could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter read tool with no output schema and no annotations, the description covers purpose, workflow placement, hint semantics, and a critical verification rule. However, because there is no output schema, the definition does not fully specify the returned listing shape or all parameter behaviors, and it explicitly offloads detail to the help tool. That deferral leaves the standalone definition incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/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 only meaningfully explains `since` (delta scans), `full` (whole bodies), and `truncated`/offset/count paging. Parameters `type`, `domain`, `limit`, `offset`, and `include_archived` are barely or not addressed, and the description defers to help(command='optimize_scan') for the rest. This leaves several param semantics implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: dump the memory corpus compactly for a curation pass. It positions itself as step 1 of a named workflow and names the sibling (optimize_stage) to use next. It is distinguishable from dedup_scan and other read siblings, though the 'dump' framing is slightly informal.

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?

It gives explicit context: use as step 1 of the optimization workflow, then stage with optimize_stage. It also warns not to treat low recall counts as archiving signals. It lacks explicit when-not-to-use guidance relative to siblings like search or get_memory, but the workflow framing is unusually clear.

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