Skip to main content
Glama

log_sanitize

Sanitizes build, test, and terminal output by removing ANSI noise, condensing routine compiler messages, and isolating failure stack traces to prevent token flooding in AI context windows.

Instructions

Sanitize build, test, or terminal command outputs. Strips ANSI noise, collapses routine compiler stdout, and isolates actionable failure stack traces to protect context window from token flooding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exitCodeNo
maxCharsNo
rawOutputYes
includeStructuredNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/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 burden of behavioral disclosure. It explains key transformative behaviors: stripping ANSI noise, collapsing routine compiler stdout, and isolating failure stack traces. It does not disclose output format or side-effect details, but the core behavior is transparent enough for an agent to predict the tool's effect.

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 a single, tightly worded sentence that front-loads the main action and then enumerates concrete transformations. Every phrase adds value, with no filler or repetition.

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

Completeness3/5

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

The description covers the general purpose and key transformations, but it omits important context such as how parameter values alter behavior, whether output is returned as plain text or structured data, and what 'collapse' means in practice. Given no output schema and no annotations, the description is adequate but leaves meaningful gaps for an agent deciding how to invoke it with the right parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for parameter documentation, but it does not explicitly explain exitCode, maxChars, or includeStructured. It only indirectly references rawOutput through phrases like 'terminal command outputs' and token flooding, leaving most parameter meaning to inference from names.

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 ('Sanitize') and resource ('build, test, or terminal command outputs'), clearly stating the tool's function. It also distinguishes itself from the sibling tools, which are about project/decision/code graph operations rather than log processing.

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 gives clear context on when to use the tool: for sanitizing command, build, or test outputs before they enter the context window. It does not explicitly state when not to use it or name alternatives, but the sibling list contains no competing log-handling tools, so the usage context is reasonably clear.

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

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/yubinbin32-ops/Mdflow-Canvas'

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