Skip to main content
Glama

context-trim

Context trim. Any text in, URL-encoded as the text query parameter (up to 12,000 bytes), a leaner rendering out: line endings normalized, trailing whitespace stripped, blank runs collapsed, adjacent duplicate lines dropped, an optional budget query parameter trimming to a character count at a paragraph, sentence, or word boundary, every change counted. Price: $0.02 per call, paid in USDC on Base mainnet over x402; an unpaid call answers HTTP 402 with the exact machine-readable payment terms.

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": {
      "text": "<text>"
    },
    "name": "context-trim"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to trim (up to 12,000 bytes).
budgetNoOptional character budget, an integer between 200 and 12,000 (default 2,000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses the 12,000-byte input cap, URL-encoding into the text query parameter, the optional budget's default of 2,000 and its paragraph/sentence/word boundary behavior, the fact that every change is counted, and the payment model ($0.02 per call in USDC on Base mainnet over x402, with HTTP 402 and machine-readable terms for unpaid calls). This is unusually rich disclosure of cost, limits, and payment flow for an unannotated tool.

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 front-loaded with purpose and then uses a compact colon-delimited list of transformations, with pricing isolated in a final sentence. It is dense and slightly run-on, but nearly every clause earns its place; only minor structural tightening would improve it.

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

Completeness4/5

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

For a two-parameter tool with no output schema and no annotations, the description covers input limits, transformations, budget behavior, and payment requirements. The only minor gap is that 'every change counted' does not specify the exact response shape, but the description is otherwise sufficient for correct invocation.

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?

Schema coverage is 100%, so the baseline would be 3, but the description adds meaning beyond the schema: it explains that text is URL-encoded as the text query parameter and that the budget trims at a paragraph, sentence, or word boundary. Those details are not present in the schema descriptions and materially affect invocation.

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 states a specific verb and resource ('Context trim', 'any text in ... a leaner rendering out') and enumerates the exact transformations: line-ending normalization, trailing whitespace stripping, blank-run collapsing, duplicate-line dropping, and optional budget trimming. An agent can distinguish this from formatting siblings like style-lint or json-to-md without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied by 'Any text in' and the list of normalization operations, so an agent can infer this is for general text cleanup rather than structured-format conversion. However, there is no explicit when-to-use versus alternatives, no when-not guidance, and no mention of siblings such as style-lint.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources