Skip to main content
Glama

compress_terminal_log

Compress noisy terminal, pytest, and compiler output by stripping ANSI codes, progress bars, and passing tests while isolating root-cause tracebacks and assertion errors to reduce token bloat.

Instructions

Compress noisy terminal, pytest, or compiler stdout/stderr by 80-97%. Strips ANSI codes, progress bars, and passing tests while strictly isolating root-cause tracebacks and assertion errors to stop thinking token bloat.

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": {
      "raw_log": "<raw_log>"
    },
    "name": "compress_terminal_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
raw_logYesRaw terminal output with ANSI sequences, spinners, or test frames.
max_charsNoMaximum character length for compressed text (default: 1200).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well by disclosing what is stripped (ANSI codes, progress bars, passing tests) and what is preserved (root-cause tracebacks and assertion errors). It does not cover edge cases such as malformed input or how max_chars truncation behaves, which keeps it from a 5.

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?

The description is two tightly written sentences with the core purpose and compression ratio front-loaded. Every phrase contributes useful information without repetition.

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 simple two-parameter transformation tool with no output schema and no annotations, the description provides enough context to understand what it does and why. It could be slightly more complete by mentioning the return value or max_chars behavior, but the schema covers the parameters.

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%, so both raw_log and max_chars are already documented in the input schema. The description adds no parameter-specific meaning beyond the schema, making the baseline 3 appropriate.

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 uses a specific verb, 'Compress,' and a specific resource, terminal/pytest/compiler stdout/stderr, with a quantified outcome of 80-97% reduction. It clearly distinguishes the tool's scope from unrelated siblings such as check_circuit_breaker and extract_ast_skeleton.

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?

It clearly indicates the tool is for noisy terminal, pytest, or compiler output and explains the motivation of stopping token bloat. It does not explicitly state when not to use it or name alternatives, but the usage context is clear.

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