Universal context optimization for AI coding assistants. Compresses and optimizes prompt context using the TokenDamper pipeline.
TokenDamper defines 4 tools with complete input schemas and descriptions. Naming follows verb_noun convention (optimize_, rehydrate_, get_). Descriptions are detailed (100-200 chars) and explain prerequisites (e.g., 'A budget is REQUIRED'). However, output schemas are not documented, LLMs cannot predict response structure for downstream chaining. Parameter descriptions are thorough but lack enums/constraints for language/kind values. Error handling guidance is minimal. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite all tools being read-only. The optimize_context tool has a confusing dual-budget design (targetReductionRatio vs maxInputTokens) that could benefit from clearer mutual-exclusivity documentation.
Retrieve execution trace and metrics for a specific optimization request
Retrieve turn count, cumulative tokens saved, and stats for an active Gateway session
Compress and optimize prompt context using the TokenDamper pipeline. A budget is REQUIRED: pass `targetReductionRatio` (or `maxInputTokens`), or configure one in tokendamper.config.json. With no budget the planner selects pass-through, runs zero stages, and returns the input unchanged at 0% reduction — the response reports that as `budgetApplied: false`.
Rehydrate elided placeholders or session references using TokenHasher cache and GatewaySessionStore
Output schemas not documented. LLMs cannot predict response structure (fields, types, pagination) for optimize_context, rehydrate_context, get_optimization_trace, or get_session_metrics. This breaks tool chaining and forces agents to guess field names.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). All 4 tools are read-only and idempotent, but this is not declared in the schema. Agents cannot distinguish safe tools from destructive ones without explicit hints.
optimize_context has dual-budget design (targetReductionRatio vs maxInputTokens) with unclear mutual exclusivity. Description states 'this or maxInputTokens' but does not specify precedence, default behavior, or error if both are omitted. Agents may pass both and get unexpected results.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | 2025-06-18+ | v2 |
preserveKinds parameter accepts array of strings but does not constrain values to enum (prompt, file, diff, conversation, note). Description lists examples but LLMs may hallucinate invalid kinds like 'code' or 'metadata'.
rehydrate_context description is vague ('Rehydrate elided placeholders or session references'). Does not explain what 'BLOCK_HASH placeholders' are, when to use this tool, or what the output contains. Agents cannot determine if this tool solves their problem.