Skip to main content
Glama

find_traces_in_file

Scan a log file to find every stack trace, group them by fingerprint, and return counts, timestamps or line numbers, exception types, and innermost application frames.

Instructions

Scan a log file for every stack trace and group them by fingerprint.

Streams the file (never loads it whole; caps: 256 MB scanned, 1000 distinct groups) and returns the groups sorted by count with first/last seen timestamps (when the lines have ISO timestamps) or line numbers, the exception, and the innermost application frame. The file must be inside the --dir sandbox (relative paths are relative to the first --dir).

Args: path: Log file path, absolute or relative to the sandbox directory. top: How many groups to list (default 15). redact: Remove secrets etc. from the output (default true).

Input Schema

NameRequiredDescriptionDefault
topNo
pathYes
redactNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 and does so well: it discloses streaming behavior, explicit caps (256 MB scanned, 1000 distinct groups), result ordering by count, and the timestamp-vs-line-number fallback. What it omits is whether the tool is strictly read-only or how it fails on an out-of-sandbox path, but the operational profile is substantially covered.

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 definition is front-loaded with the core purpose and constraints, then breaks parameters into an explicit Args block, so an agent can skim the first sentence and still act. It is slightly longer than necessary given that defaults are restated, but no sentence is filler.

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 file-scanning tool with three parameters and an output schema present, the description supplies the sandbox constraint, resource caps, ordering, and the shape of each group, which is what an agent needs to call it correctly and interpret results. The only meaningful gap is the absence of sibling routing guidance.

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 description coverage is 0%, so the description must compensate, and it does: it explains that path may be absolute or relative to the sandbox directory, that top controls how many groups are listed, and that redact removes secrets from output. Defaults are repeated from the schema, but the semantic meaning of each parameter is clarified beyond the bare titles.

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 opening sentence gives a specific verb and resource ('Scan a log file for every stack trace') plus the transformation performed ('group them by fingerprint'), which cleanly separates it from siblings like parse_trace (single trace) and fingerprint (compute a fingerprint). An agent can select this tool 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 Guidelines3/5

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

The description states a hard prerequisite ('The file must be inside the --dir sandbox') and clarifies path resolution, which is genuinely useful usage context. However, it never says when to prefer this over siblings such as parse_trace or compare_traces, nor when not to use it, so the routing guidance is only implied by the purpose sentence.

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