Skip to main content
Glama

tokendiet_compress_session

Compress multi-turn coding-agent traces by deduplicating repeated cross-turn reads, pruning logs, and skeletonizing code while preserving error anchors and AST validity.

Instructions

Compress a multi-turn coding-agent trace using C++20 cross-turn read deduplication, log pruning, and AST skeletonization.

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": {
      "turns": "<turns>"
    },
    "name": "tokendiet_compress_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
turnsYes
focus_symbolsNo
log_budget_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations, the description carries full disclosure burden, and it only identifies internal techniques without stating whether compression is lossy, what information is discarded (reads deduplicated, logs pruned, code skeletonized — irreversibly?), or how the caller should treat the result. It hints at mutation of the input trace semantics but never confirms whether the original is preserved.

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?

A single front-loaded sentence with no wasted words, though the density of unexplained jargon ('AST skeletonization', 'cross-turn read deduplication') costs some clarity rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with three undocumented parameters, no annotations, and no output schema, the description does far too little: it omits parameter meanings, lossiness, and what the compressed trace looks like. An agent cannot call this correctly without guessing at focus_symbols and log_budget_tokens semantics.

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

Parameters2/5

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

All three parameters (turns, focus_symbols, log_budget_tokens) have 0% schema description coverage and none are explained in the description. The phrase 'log pruning' only faintly implies log_budget_tokens, while focus_symbols and the shape of each turn object are entirely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — compress a multi-turn coding-agent trace — and names the techniques applied (cross-turn read deduplication, log pruning, AST skeletonization). It is distinguishable from tokendiet_skeletonize_code and tokendiet_prune_tool_output by operating on whole traces rather than individual code or tool outputs, though it never says so explicitly.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus the sibling tools, even though the description names techniques (log pruning, AST skeletonization) that clearly overlap with tokendiet_prune_tool_output and tokendiet_skeletonize_code. The agent is left to infer that this is the whole-trace pipeline, with no preconditions or exclusions stated.

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