Skip to main content
Glama

error_clusters

Groups log errors into normalized message templates, collapsing variable IDs, IPs, paths and timings so repeated failures become one cluster with counts, first/last seen and a real example event.

Instructions

Group events at or above level into message templates. Numbers, UUIDs, IPs, hex ids, paths and URLs are normalised away so 'timeout after 31ms for user 8f2c...' and '... 47ms for user 91ab...' become one template. For stack traces the exception line is part of the template. Each cluster shows count, first/last seen, levels and a real example event. Use level='all' to cluster everything.

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": {
      "path": "<path>"
    },
    "name": "error_clusters"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNo+00:00
topNo
pathYes
levelNoERROR
sinceNo
untilNo
include_rotatedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the normalization rules (numbers, UUIDs, IPs, hex ids, paths, URLs), the stack-trace exception-line rule, and what each cluster contains (count, first/last seen, levels, example event). It does not state cost/volume behavior for large log sets or whether rotated files are included by default.

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?

Front-loaded with the core operation, then progressively adds the normalization example and output fields. The paired timeout example is long but earns its place by making the templating behavior unambiguous; no filler sentences.

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?

Return-value detail is excused by the output schema, but for a 7-parameter tool with zero annotation coverage the description leaves too much unsaid about time-range filtering, result limiting, and rotated-log handling. It is complete on purpose and grouping behavior, incomplete on invocation detail.

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 coverage is 0% across 7 parameters, so the description must compensate and largely does not. Only `level` gets real meaning, including the non-obvious 'all' sentinel that the schema does not enumerate; `path`, `top`, `since`, `until`, `tz` and `include_rotated` receive no explanation, leaving the most consequential ones (time window, cluster count, rotated-file inclusion) opaque.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Group events at or above `level` into message templates', then explains the normalization mechanism with a concrete before/after example. The grouping-into-templates operation is clearly distinct from the sibling search/tail/timeline tools, though no sibling is named explicitly.

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 only when-to-use guidance is the parameter hint "Use level='all' to cluster everything", which implicitly contrasts default ERROR-only clustering with full clustering. There is no statement of when to choose this over search_logs or log_overview.

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