MCP server exposing the tokenslim context-compression engine (compress / retrieve / stats tools) to any MCP host.
TokenSlim exposes three focused, read-only tools with clear naming (verb_noun pattern: compress, retrieve, stats). All tools have descriptions (194 - 250 chars, within baseline 34 - 392 range). Input schemas are present and typed. However, parameter descriptions are sparse or missing entirely: 'content_type' in tokenslim_compress lacks a description; 'hash' in tokenslim_retrieve has minimal guidance. Output schemas are not formally documented, the response structure is inferred from code (compress returns 'content', 'hash', 'changed', 'content_type', 'stats'; retrieve returns 'found', 'hash', 'content'; stats returns counters). Error handling is minimal: no recovery guidance, no actionable error messages, no distinction between retryable vs fatal failures. The tools are well-composed (single responsibility, idempotent reads) but lack the LLM-optimized descriptions and structured output documentation expected of A-grade tools.
Compress a content blob (tool output, log, JSON, file, RAG chunk). Returns compressed text, token stats (orig/new/saved/ratio), and a CCR hash usable with tokenslim_retrieve.
Return the original, uncompressed content for a CCR hash.
Report cumulative compression savings for the current session.
Parameter descriptions missing or incomplete. 'content_type' in tokenslim_compress has no description; 'hash' in tokenslim_retrieve lacks guidance on format or origin. LLMs cannot infer parameter meaning from names alone.
Output schemas not formally documented. Response structures (e.g., 'stats' object with 'orig_tokens', 'new_tokens', 'saved_tokens', 'ratio') are inferred from code, not declared in tool definitions. LLMs need explicit output schemas to plan downstream calls.
No error handling guidance. Tools raise ValueError for invalid input but provide no recovery hints. E.g., if 'hash' is not found, retrieve_tool returns {found: false}, acceptable, but compress_tool raises ValueError with no actionable message for the LLM.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 54 | 2026-07-28+ | v2 |
No constraints on 'content' parameter size. Unbounded string input could cause memory exhaustion or timeout. Rubric baseline: numeric/string params should specify min/max or limits.
Tool descriptions lack dependency hints or prerequisites. E.g., tokenslim_retrieve should note 'Requires a hash from a prior tokenslim_compress call' to guide multi-step planning.