Skip to main content
Glama
dshakes

distil

by dshakes

distil_compress

Idempotent

Compress large text outputs into a compact digest with a recoverable handle, reducing context usage while preserving exact retrieval on demand.

Instructions

Reversibly compress a text blob — typically a large tool output you want to keep in context cheaply. Returns JSON {"compressed": str, "handle": str|null, "tokens_saved": int}: a compact digest to keep in the conversation, plus an 8-hex handle that recovers the exact original bytes via distil_expand. The original is stored locally (encrypted, owner-only) and never sent anywhere. Use when a tool result is large enough that carrying it verbatim is wasteful; skip it for short text, which comes back unchanged with handle=null and tokens_saved=0. Errors return "error: ..." with isError set; nothing is stored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesRaw text to compress, passed verbatim — do not pre-summarize or truncate it, or the recovered original will be lossy.
Behavior5/5

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

The description discloses key behavioral traits beyond the annotations: local encrypted storage, owner-only access, never sent elsewhere, error return format ('error: ...' with isError), and the condition for handle=null. This significantly aids the agent in understanding side effects and error handling.

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?

The description is a single paragraph that efficiently covers purpose, output, usage, and behavior. It is front-loaded with the main purpose and each sentence provides necessary information, though it is slightly dense. No wasted words, but could be broken into bullet points for clarity.

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 the simple single-parameter tool with no output schema, the description is remarkably complete. It explains the return value structure, handle behavior, storage details, token savings, error handling, and usage conditions. The annotations already cover safety and idempotency, so the description fills all remaining contextual gaps.

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?

With 100% schema coverage, the baseline is 3. The description adds value by emphasizing that the text must be passed verbatim without pre-summarization or truncation, which is critical for lossless recovery. This extra guidance justifies a higher score.

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 clearly states the tool's purpose: 'Reversibly compress a text blob' to keep large tool output in context cheaply. It distinguishes itself from siblings by mentioning how the handle can recover the original via distil_expand, and implicitly differentiates from distil_savings by focusing on compression.

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?

Explicitly states when to use: 'when a tool result is large enough that carrying it verbatim is wasteful' and when not: 'skip it for short text'. Also explains the behavior for short text, providing clear decision guidance without alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dshakes/distil'

If you have feedback or need assistance with the MCP directory API, please join our Discord server