Skip to main content
Glama

Parse Exception Logs

parse_exception_log

Aggregate raw exception logs to group by exception type, count occurrences, and extract root cause and first frame, returning a structured summary of dominant errors and their origins.

Instructions

Aggregate raw exception logs: group by exception type, count occurrences, extract root cause (Caused-by chain) and first frame. Returns a structured summary you can use to tell which error dominates and where it originates.

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": {
      "logs": "<logs>"
    },
    "name": "parse_exception_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
logsYesRaw exception / stack-trace log text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses the transformation performed (grouping, counting, root-cause chain extraction, first-frame extraction) and that a structured summary is returned, which is useful. It does not state that this is a pure read/parse operation with no side effects, nor does it mention handling of very large log inputs, truncation, or unparseable text.

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?

Two sentences, zero filler, with the operation list front-loaded and the output purpose placed at the end. Every clause maps to a real behavior of the tool.

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 does the work of describing the return value: a structured summary with exception types, counts, root cause and first frame. That is sufficient for an agent to call it confidently; only exact output shape and any size/parse limits are unstated.

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?

There is a single parameter at 100% schema description coverage, so the baseline is already 4. The description adds meaning by clarifying the expected format — raw exception/stack-trace text containing Caused-by chains — which tells the agent what kind of content the input should hold.

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 concrete verb (aggregate) plus the resource (raw exception logs) and enumerates the operations: grouping by exception type, counting occurrences, extracting the Caused-by root cause chain and first frame. The resource is distinct from siblings such as analyze_thread_dump and analyze_gc_log, though the description never names those alternatives to reinforce the distinction.

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 closing sentence gives a clear selection context: use this when you need to know which error dominates and where it originates. That is enough to route an agent versus the heap/GC/thread-dump siblings, but there are no explicit exclusions or named alternatives, so it stops 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.