Skip to main content
Glama

Ratchet debt burn-down

get_ratchet_report
Read-onlyIdempotent

Track marked debt burn-down: open marks with age, repayments, and policy findings show if debt is repaid or piling up.

Instructions

Reports the ratchet debt burn-down: open marks with their age, repayments and policy findings. Use it to judge whether marked debt is repaid or piling up, and get_function_history for one function's mark. It reads the marks file and its git log only, ages count back from the newest commit touching that file, never the clock, and no marks file means zeros. repo can be any directory under a measured checkout, and an unmeasured one answers isError true with the setup pointer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNopath to the scored repo's root (default: the repo the server was started in)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
openNomarks open on disk, working tree included: an uncommitted seed counts
oldestNoup to 20 open marks, oldest first
schemaNopayload schema version, 1
anchor_tsNounix seconds of the newest commit that touched the ratchet file; every age and window counts back from here, never from the wall clock; 0 with no ratchet history
uncommittedNomarks the working tree and the newest committed ratchet file disagree on: added, repaid or tightened but not committed
dropped_totalNomarks repaid over the whole committed history
dropped_last_30dNomarks repaid in the 30 days before anchor_ts
dropped_last_90dNomarks repaid in the 90 days before anchor_ts
policy_violationsNonull when no debt policy is configured, [] when the policy ran clean, else the findings as sentences

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description reveals material behavior: it reads only the marks file and its git log, ages are computed from the newest commit touching that file rather than the clock, a missing marks file yields zeros, and unmeasured checkouts return isError true with a setup pointer. This exceeds what annotations alone communicate.

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?

The description is dense but every clause earns its place: core output, intended use, alternative tool, data source, age semantics, edge case, and error behavior are all packed without redundancy. 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 an output schema already exists, the description covers all the essential call-time knowledge: what the report contains, how to use it, what data it reads, how age is computed, and behavior for missing files and unmeasured repos. Nothing critical is left for the agent to infer.

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

Parameters4/5

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

The input schema already fully documents the single optional repo parameter with 100% coverage, so the baseline is 3. The description adds meaningful semantics by clarifying that repo can be any directory under a measured checkout and that unmeasured ones produce an isError response, which is value 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 description opens with a specific verb and resource: 'Reports the ratchet debt burn-down' and enumerates exactly what it contains (open marks, age, repayments, policy findings). It also names get_function_history as the sibling for single-function marks, so the tool is clearly distinguished from nearby alternatives.

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?

It explicitly states the intended decision use case: 'Use it to judge whether marked debt is repaid or piling up.' It also gives a direct alternative with a condition: 'get_function_history for one function's mark.' This is clear when-to-use and when-to-use-elsewhere guidance.

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