Skip to main content
Glama

batch_cleanup

Idempotent

Deletes completed batch ledgers past retention, keeping incomplete attempts as duplicate-send evidence. Cleans local text and file paths only; does not delete Telegram messages or attachments.

Instructions

Delete completed batch ledgers older than the configured retention period, or the explicitly supplied positive number of days. Incomplete and unconfirmed attempts are always retained because deleting them would erase duplicate-send evidence. This removes local message text and file paths; it does not delete Telegram messages or attachment files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
older_than_daysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4/5.0
Behavior1/5

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

Annotation Contradiction: destructiveHint=false conflicts with the description's explicit 'Delete completed batch ledgers' and 'removes local message text and file paths.' Although the description is transparent about retention and non-deletion of Telegram messages, the annotation says the tool is not destructive, which is misleading for an agent relying on annotations.

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 with a distinct job: action, retention rationale, and scope limitations. No filler or repetition; the most important information is front-loaded.

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 one optional parameter and no output schema, the description covers what is deleted, what is kept, and what is untouched. It is sufficient for an agent to invoke the tool correctly.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the full burden and delivers. It explains the optional parameter's semantics ('explicitly supplied positive number of days'), the default behavior (configured retention period), and the threshold direction ('older than'). This adds meaning far beyond the bare schema.

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 opens with a specific verb and resource: 'Delete completed batch ledgers' and adds precise conditions ('older than the configured retention period, or the explicitly supplied positive number of days'). This clearly distinguishes it from sibling batch tools like batch_status or preview_batch.

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 gives clear context for when to use the tool: cleaning up completed batch ledgers by age. It also states exclusions — incomplete and unconfirmed attempts are retained, and it does not delete Telegram messages or attachment files — which tells an agent when not to use it. It does not name an alternative tool, but no cleanup sibling exists.

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