Skip to main content
Glama

API Keg — Trace Diet (HAR & Log Distiller)

Cluster Noisy Logs via Drain Prefix-Tree

cluster_logs
Read-onlyIdempotent

Folds multi-line stack traces (JS/Java 'at ...', Python Traceback, Go panics, Java 'Caused by:'), parses plain-text, Docker/Kubernetes CRI, and NDJSON logs, pre-masks ///<ISO_TS>//, and runs a fixed-depth Drain prefix-tree clusterer to collapse 50,000+ log lines by 95–99% with errorClusters highlighted first. Pricing: $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 2,000 log lines, capped at $0.008), x402 variable settlement). Pass ?dry_run=true on REST to validate schema free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cluster_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
logsNoRaw plain-text, Docker/Kubernetes CRI, or newline-delimited JSON (ndjson) log stream.
linesNoPre-split array of log lines (alternative to passing a single 'logs' string).
treeDepthNoFixed Drain prefix-tree depth (length -> leading tokens -> leaf templates).
maxClustersNoMaximum canonical Drain clusters maintained before routing outliers to overflow.
maxStackTraceCharsNoMaximum characters retained per cluster sampleStackTrace.
maxReturnedClustersNoMaximum ranked clusters returned in the response payload.
similarityThresholdNoDrain token-similarity threshold [0.2-1.0] required to merge a log line into an existing canonical template.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior. The description adds substantial context beyond that: stack-trace folding, pre-masking of UUID/IP/HEX/ISO_TS/URL/NUM tokens, 95–99% reduction, errorClusters ordering, pricing, and dry-run validation. It stops short of describing response fields or failure behavior, so 4 rather than 5.

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 behavior, and most wording earns its place. The pricing parenthetical is somewhat redundant ('$0.002 base' repeated and 'max' overlapping with 'capped at $0.008'), but the overall structure remains dense and useful.

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 complex clustering tool, the description covers inputs, masking, algorithm, performance, cost, and a hint at output ordering. With no output schema, it should say more about returned cluster fields, counts, and overflow handling, so it is strong but not fully complete.

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 the schema already documents all seven parameters including treeDepth, maxClusters, and similarityThreshold. The description adds little per-parameter meaning beyond 'fixed-depth' and masking context, matching the baseline 3 when schema coverage is high.

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 ('collapse 50,000+ log lines', 'clusterer') and names the mechanism ('fixed-depth Drain prefix-tree'). It also enumerates supported input formats and stack-trace folding, so an agent can tell exactly what it does 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 Guidelines4/5

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

It gives clear usage context by naming supported formats (plain-text, Docker/Kubernetes CRI, NDJSON), multi-line stack traces, and noisy 50,000+ line workloads, plus dry-run validation for REST. It does not state when not to use it or compare against the sibling tool, so it falls short of a 5.

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