Skip to main content
Glama

analyze_bug

Identify a bug's root cause by analyzing symptoms, logs, and stack traces. Returns a structured hypothesis with evidence, severity, priority, and fix recommendations.

Instructions

Analyze symptoms, stack traces, logs, and source to find the root cause of a bug. Returns a structured prompt that yields a hypothesis with evidence, severity, priority, recommended fix, and prevention actions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsNoRelevant log excerpts (trim to the bug window).
symptomYesWhat the user / monitor observed. Include error messages verbatim.
stackTraceNoStack trace, if any.
environmentNoDeployment env, version, traffic profile, recent changes.
sourceContextNoSource snippets of the suspected code paths.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses that the tool returns a structured prompt rather than a direct answer, and enumerates the fields (hypothesis, evidence, severity, priority, fix, prevention). It stops short of stating permissions, side effects, or whether the analysis is read-only.

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 tight sentences, front-loaded with the purpose and immediately followed by the return behavior. Every clause earns its place with no redundancy.

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 helpfully explains what the tool returns, and parameter coverage is complete via the schema. The main missing piece is usage/routing guidance against similar siblings like generate_rca.

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 each of the five parameters is already documented in the schema. The description lists the same input types (symptoms, stack traces, logs, source) without adding format or syntax detail, so the baseline 3 applies.

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 (analyze) and resource (bug) plus the input types it consumes (symptoms, stack traces, logs, source). However, it does not differentiate itself from the sibling 'generate_rca', which is a closely related root-cause-analysis tool an agent could easily confuse with this one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description implies its use case ('to find the root cause of a bug') but gives no explicit when-to-use, when-not-to-use, or alternative tool guidance. With a sibling like generate_rca present, the absence of routing guidance is a real gap.

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