Skip to main content
Glama

llmtrim_compress_text

Shrink a text chunk (tool output, document) by compressing it; returns the compressed text with token savings to reduce cost.

Instructions

Compress a single text blob and report the token savings. Use this to shrink one chunk (a tool output, a document) rather than a whole request. The text is wrapped in a minimal request, compressed, and the shrunk text is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesA single text blob to shrink (a tool output, a document, a message). It is wrapped in a one-message request, compressed, and the shrunk text is returned.
Behavior4/5

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

With no annotations, the description fully explains the process: wraps text in minimal request, compresses, and returns shrunk text with token savings. It covers the key behavioral aspects, though it could mention whether the operation is reversible or has side effects (likely none).

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?

Three concise sentences with no fluff. First sentence states action and output. Second provides usage guidance. Third explains the process. Perfectly structured.

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?

For a simple tool with one parameter, the description covers what it does, when to use it, and what to expect (shrunk text with token savings). No output schema needed.

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 description coverage is 100% and already explains the 'text' parameter. The tool description reinforces that it should be a single chunk, adding slight context but not significantly beyond the schema.

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 it compresses a single text blob and reports token savings. It distinguishes itself from siblings by specifying 'rather than a whole request', implying the sibling tools handle multiple chunks or different scopes.

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

Usage Guidelines4/5

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

The description explicitly says to use for shrinking one chunk (tool output, document) rather than a whole request, providing clear context. It does not mention explicit alternatives but implies the other tool for whole requests.

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/fkiene/llmtrim'

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