Skip to main content
Glama

tokmeter_cleanup_preview

Read-only

Preview which session files, database rows, and bytes a cleanup would delete for selected time, project, or provider filters before running the terminal cleanup command.

Instructions

Preview what session data would be deleted for the given filters. Shows affected files, directories, database rows, total bytes, and per-project/provider breakdown. Read-only: deleting is not available over MCP; the user runs tokmeter cleanup in a terminal.

Input Schema

NameRequiredDescriptionDefault
scopeNoTime scope: today, week (last 7d), month (calendar month), or all (default)
sinceNoStart date (YYYY-MM-DD) for custom date range
untilNoEnd date (YYYY-MM-DD) for custom date range
projectNoFilter by project name/path substring
providersNoFilter to specific providers (e.g. ['claude-code','cursor'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.19.3

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description reinforces rather than contradicts them while adding context the annotations cannot convey: the actual safety boundary (no delete capability over MCP) and the escalation path (user runs the CLI). It also describes the shape of the response (files, dirs, rows, total bytes, breakdowns), which compensates for the absent output schema.

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 tight sentences with no filler: what it previews first, what it returns second, the safety constraint last. Every sentence earns its place and the most decision-relevant information (read-only, no deletion) is stated plainly.

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, the description usefully covers return content, and it fully covers the read-only safety profile for a five-parameter, zero-required tool. The one remaining gap is filter precedence — whether scope overrides or combines with a custom since/until range — which is left unaddressed in both the description and schema prose.

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 scope, since, until, project, and providers are all fully documented in the schema itself. The description adds no parameter-level detail such as how scope interacts with since/until when both are supplied, so baseline 3 applies.

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?

States a specific verb and resource ('Preview what session data would be deleted') and immediately enumerates the outputs: affected files, directories, database rows, bytes, and per-project/provider breakdown. No sibling does cleanup or deletion analysis, so the tool is unambiguously distinguishable from the analytics tools in the same namespace.

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?

The description makes the usage condition clear: this is a preview only, and deletion is explicitly unavailable over MCP — the user must run `tokmeter cleanup` in a terminal. That gives the agent a concrete when-to-use and a routing instruction for the when-not. It doesn't enumerate which sibling to prefer for plain historical queries, but no sibling overlaps the destructive-cleanup workflow.

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