Skip to main content
Glama
task-checkpoint

task-checkpoint

tc_compress

Delete old change-layer payloads beyond a retention window to reclaim checkpoint storage; step baselines remain, so restoring by index still works.

Instructions

Reclaim checkpoint space by deleting change-layer payloads older than the retention window. Use it when the store has grown large. Reclaimed layers can no longer be restored, but step baselines are untouched, so tc_restore by index still works.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "root": "<root>"
    },
    "name": "tc_compress"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootYesWorkspace root
maximumNoMaximum number of layers to keep per path; default 50
minimumNoMinimum number of older layers to keep per path; default 20
keep_secondsNoKeep change layers newer than this many seconds; default 7 days

Output Schema

NameRequiredDescriptionDefault
maximumYes
minimumYes
eligibleYesPassed the safety checks and were eligible for reclaiming
convertedYesPayloads actually deleted
bytes_freedYesBytes freed
already_goneYesMarked unrestorable but the payload was already absent
keep_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.8
    • changedInput schema / properties / keep_seconds / description
      Previous value: -"保留最近多少秒内的变更层,默认 7 天"New value: +"Keep change layers newer than this many seconds; default 7 days"
    • changedInput schema / properties / maximum / description
      Previous value: -"每条路径最多保留几份变更层,默认 50"New value: +"Maximum number of layers to keep per path; default 50"
    • changedInput schema / properties / minimum / description
      Previous value: -"每条路径至少保留几份较旧的变更层,默认 20"New value: +"Minimum number of older layers to keep per path; default 20"
    • changedInput schema / properties / root / description
      Previous value: -"工作区根目录"New value: +"Workspace root"
    • changedOutput schema / properties / already_gone / description
      Previous value: -"已标为不可回退但 payload 本来就不在的数量"New value: +"Marked unrestorable but the payload was already absent"
    • changedOutput schema / properties / bytes_freed / description
      Previous value: -"释放的字节数"New value: +"Bytes freed"
    • changedOutput schema / properties / converted / description
      Previous value: -"本次真的删掉的 payload 数"New value: +"Payloads actually deleted"
    • changedOutput schema / properties / eligible / description
      Previous value: -"通过了保护检查、可以考虑回收的数量"New value: +"Passed the safety checks and were eligible for reclaiming"
  2. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it explicitly warns that reclaimed layers can no longer be restored and clarifies that step baselines survive, so restore-by-index still works. It omits permissions required, whether the operation is interruptible/atomic, and any cost or locking implications, which keeps it short of a 5.

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?

Two sentences, no filler, front-loaded with the action and its effect. The safety caveat follows immediately after the trigger condition, which is the right ordering for a destructive operation.

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?

For a destructive maintenance tool with an output schema and fully described parameters, the definition covers what is deleted, what survives, and the safety relationship to tc_restore. Only operational details (permissions, concurrency, expected duration) are absent, which are minor given the output schema.

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%, so the schema documents root, maximum, minimum, and keep_seconds with defaults. The description reinforces the 'retention window' concept that maps to keep_seconds but adds nothing about how maximum/minimum interact, so the baseline 3 is appropriate.

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 object ('Reclaim checkpoint space by deleting change-layer payloads') plus the scope condition ('older than the retention window'), so the agent knows exactly what is removed and under what threshold. It also implicitly distinguishes itself from tc_restore by framing deletion vs. restoration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use it when the store has grown large' gives a loose trigger condition but no concrete thresholds and no when-not guidance. It never mentions alternatives such as exporting or adjusting the retention parameters instead of compressing, so the agent must infer the boundary from the sibling list.

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