Skip to main content
Glama

Delimit Ledger Auto Cancel Stale

delimit_ledger_auto_cancel_stale
Destructive

Archive open ledger items dormant past the stale TTL threshold to automate nightly cleanup, retiring inactive entries while preserving the append-only log.

Instructions

Auto-archive open ledger items dormant past the stale-TTL threshold.

When to use: as nightly automation / scripted cleanup to retire items that have gone quiet past a strict threshold (default 60 days). When NOT to use: to merely surface stale candidates without applying (use delimit_ledger_groom which is propose-only and uses a softer 30-day default), to inspect ledger health (use delimit_ledger_health), or to auto-close items mirrored from external repos (delimit_ledger_auto_close_external).

Sibling contrast: delimit_ledger_groom proposes archives with a softer threshold and never applies; delimit_ledger_auto_close_external targets externally-mirrored items; delimit_ledger_bulk is the underlying bulk-action surface; this composes the stale-detector with bulk_action(archive) on a stricter dormancy threshold.

Side effects: with dry_run=False, archives matching items via bulk_action(archive). Items are never hard-deleted — the JSONL append-only log retains the full record. With dry_run=True (default), returns the plan only.

LED-1145 Phase 2 #4.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoTrue (default) returns the plan; False applies via bulk_action(archive).
ventureNoProject name or path. Auto-detects if empty.
max_itemsNocap items processed per call. When the candidate list exceeds this, response includes truncated=True so the caller can run again to drain.
threshold_daysNodormancy threshold in days. 0 = read default (60 from STALE_TTL_DEFAULT_DAYS or DELIMIT_STALE_TTL_DAYS env). Pass an int to override.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.7.9

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses the key side effects: with dry_run=False it archives via bulk_action(archive), with dry_run=True it returns only the plan, items are never hard-deleted, and the JSONL append-only log retains full records. It also explains the composition with the stale-detector and bulk_action, which goes well beyond what annotations alone provide.

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?

The description is well-organized with clear sections and front-loaded purpose, but it is somewhat long and repeats sibling contrast in both the 'When NOT to use' and 'Sibling contrast' sections. The trailing internal reference 'LED-1145 Phase 2 #4' also adds little value for an agent selecting or invoking the tool.

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 complexity, destructive nature, and rich sibling set, the description covers selection criteria, invocation semantics, dry-run behavior, persistence guarantees, and composition with bulk actions. An output schema exists, so lack of explicit return-value detail is acceptable; nothing essential for correct use is missing.

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?

The input schema already covers all four parameters with detailed descriptions (100% coverage), so the baseline is 3. The tool description adds general context about the 60-day default and strict threshold, but does not materially extend the schema's parameter-level explanations.

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 states a specific action (auto-archive open ledger items dormant past stale-TTL threshold) with the resource and behavior clearly named. It differentiates itself from siblings like delimit_ledger_groom and delimit_ledger_auto_close_external, so an agent can select it accurately.

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 gives explicit 'When to use' and 'When NOT to use' guidance, naming exact alternatives (delimit_ledger_groom, delimit_ledger_health, delimit_ledger_auto_close_external) and the conditions that route to each. This is ideal for an agent deciding between closely-related ledger tools.

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

Deploy Server

Other Tools