Skip to main content
Glama

Investigate Error Spike

investigate_error_spike
Read-onlyIdempotent

Compare recent error rates against a baseline to confirm a spike, then rank top contributing services, models, and error types.

Instructions

Investigate an error-rate spike: compare a recent window against a baseline and rank which services/models/error types contributed most.

is_spike requires both an absolute error-count floor and a relative rate-multiplier to hold, so a tiny sample (e.g. 1 error becoming 2) doesn't read as a spike.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of traces to analyze per window (default: 1000)
top_nNoMaximum ranked contributors to return per breakdown (default: 5, max: 50)
recent_endYesRecent window end time in ISO 8601 format
baseline_endNoBaseline window end (ISO 8601)
recent_startYesRecent window start time in ISO 8601 format
service_nameNoFilter by service name (applied to both windows)
baseline_startNoBaseline window start (ISO 8601). If omitted along with baseline_end, auto-computed as the same duration immediately preceding recent_start.
min_error_count_increaseNoMinimum absolute error-count increase to count as a spike (default: 3)
rate_multiplier_thresholdNoMinimum error-rate multiplier (recent / baseline) to count as a spike (default: 2.0)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.11.0
    • addedInput schema / properties / baseline_end / description
      Added value: +"Baseline window end (ISO 8601)"
    • addedInput schema / properties / baseline_start / description
      Added value: +"Baseline window start (ISO 8601). If omitted along\nwith baseline_end, auto-computed as the same duration\nimmediately preceding recent_start."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of traces to analyze per window (default: 1000)"
    • addedInput schema / properties / min_error_count_increase / description
      Added value: +"Minimum absolute error-count increase to\ncount as a spike (default: 3)"
    • addedInput schema / properties / rate_multiplier_threshold / description
      Added value: +"Minimum error-rate multiplier (recent /\nbaseline) to count as a spike (default: 2.0)"
    • addedInput schema / properties / recent_end / description
      Added value: +"Recent window end time in ISO 8601 format"
    • addedInput schema / properties / recent_start / description
      Added value: +"Recent window start time in ISO 8601 format"
    • addedInput schema / properties / service_name / description
      Added value: +"Filter by service name (applied to both windows)"
    • addedInput schema / properties / top_n / description
      Added value: +"Maximum ranked contributors to return per breakdown (default: 5, max: 50)"
  2. Addedv0.8.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds valuable behavioral context by explaining the spike detection criteria (absolute floor and relative multiplier), which prevents misuse on tiny samples. No contradiction with annotations.

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 with no fluff. The primary purpose is front-loaded, and the nuance about spike criteria is concisely added. Every sentence earns its place.

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?

Given the tool's complexity (9 params, 100% schema coverage) and presence of an output schema, the description covers the core logic well. It could mention how the output is structured or when to prefer this over siblings, but those are covered elsewhere or optional. Overall, sufficient for correct invocation.

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 all parameters are already documented. The description adds marginal value by referencing the spike criteria, but it doesn't explicitly map to the min_error_count_increase and rate_multiplier_threshold parameters beyond what the schema states. Baseline 3 is appropriate.

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 clearly states a specific verb ('investigate') and resource ('error-rate spike'), and explains the action: compare a recent window against a baseline and rank contributors. It distinguishes itself from sibling tools like investigate_cost_spike by focusing on error rates, and from compare_time_windows by ranking contributions.

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 implies usage for investigating error spikes but does not explicitly state when to use this tool versus alternatives like compare_time_windows or search_traces. No exclusions or alternative routing are provided, leaving the agent to infer context from the name and sibling list.

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