Skip to main content
Glama

Compress logs (free)

compress_log
Read-onlyIdempotent

[FREE] Compress log output: strip timestamps/ids noise, dedupe repeated lines with (xN) counts, collapse stack traces, keep head/tail and all error/warn lines within max_lines. Reports estimated tokens saved. Limit 120/hour per IP.

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": "compress_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesRaw log text
max_linesNodefault 200

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description earns credit for adding what they don't: the rate limit of 120/hour per IP and the preservation rules (error/warn lines and head/tail survive trimming). It doesn't explain what happens if text exceeds max_lines after preserving all errors, but the behavioral picture is otherwise solid.

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?

A single front-loaded sentence packs purpose, transformations, retention policy, output signal, and rate limit with no filler. Every clause carries information.

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?

With no output schema, the description compensates by stating 'Reports estimated tokens saved', and the 2-param schema is fully documented. Only gap is error/edge behavior (e.g., empty or non-log text), which is minor for a pure transform.

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 baseline is 3, but the description adds real semantics for max_lines by explaining what it does and doesn't evict ('keep head/tail and all error/warn lines within max_lines'), telling the agent that the cap is soft for error lines. The text parameter gets no extra treatment, which is acceptable for raw input.

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?

Specific verb+resource ('Compress log output') followed by the concrete transformations performed: noise stripping, dedupe with (xN) counts, stack-trace collapsing, head/tail retention. This is clearly distinct from siblings like trim_json, summarize, or estimate_tokens, which an agent could otherwise confuse it with.

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?

The purpose implies the use case, but the description never states when to pick this over summarize or trim_json, nor does it describe behavior on non-log input. The only explicit operating constraint given is the 120/hour per-IP limit.

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