Skip to main content
Glama

Delimit Ledger Health

delimit_ledger_health
Read-onlyIdempotent

Get a traffic-light health verdict on your ledger with totals, P0, stale, duplicates, and garbage counts, plus pre-formatted next actions for remediation.

Instructions

One-shot ledger health check — totals + P0 + stale + duplicates + garbage.

When to use: at session start (orchestrator session ritual) or nightly review to get a traffic-light verdict on the ledger. When NOT to use: to apply changes (use delimit_ledger_bulk) or inspect a single item (delimit_ledger_query).

Sibling contrast: delimit_ledger_groom proposes archives; delimit_ledger_context returns top-5 open; this composes them into a one-shot health verdict with pre-formatted next_actions.

Side effects: read-only. Internally calls list_items + groom + P0 quota helpers.

LED-1145 capstone — closes the loop on the entire ledger-tooling refactor. Designed for nightly/weekly review or session-start status snapshot. Returns:

  • totals (unresolved / open / in_progress / blocked)

  • p0 (count vs quota + health)

  • stale (count >stale_days + health)

  • duplicates (group count + total items + health)

  • garbage_venture (count + health)

  • overall_health (worst-of: green / yellow / red)

  • next_actions: pre-formatted list of {reason, tool, args, follow_up}

All Phase 1+2 tools are referenced in the suggested actions, so the response is self-contained for an AI agent that wants to act on it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ventureNoproject name or path. Auto-detects if empty.
stale_daysNostale-detector threshold passed to groom_proposal.
dup_min_countNoduplicate-detector threshold passed to groom_proposal.

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 read-only/idempotent/destructive annotations, it discloses that the tool internally calls list_items + groom + P0 quota helpers, is a composition, and produces a self-contained response with pre-formatted next_actions. This gives an agent an accurate model of what happens when invoked.

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 front-loaded with a one-line summary and uses clear section labels. It is somewhat longer than strictly necessary — the 'LED-1145 capstone' line and the detailed Returns list partly duplicate the output schema and earlier usage guidance — but the structure keeps it scannable.

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?

The description covers selection criteria, exclusions, side effects, internal behavior, output shape, and self-contained actionability. With a rich output schema and annotations also present, nothing an agent needs to invoke this tool correctly 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?

Schema coverage is 100% and the schema already describes venture, stale_days, and dup_min_count, including defaults. The description adds only indirect context, so it meets the baseline but adds little beyond the 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 opening phrase 'One-shot ledger health check — totals + P0 + stale + duplicates + garbage' combines a specific verb, resource, and distinctive scope. It also names sibling tools it composes, so an agent can distinguish it from delimit_ledger_groom and delimit_ledger_context.

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 explicitly states when to use (session start or nightly review), when not to use (applying changes or inspecting a single item), and names the correct alternatives (delimit_ledger_bulk, delimit_ledger_query). This is exactly the guidance needed for tool selection.

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