Skip to main content
Glama

compare_windows

Compare error templates across two log windows to identify new, spiked, or disappeared errors, showing what changed or broke recently.

Instructions

What changed? Compare error templates between window A (baseline) and window B. Reports templates that are NEW in B, SPIKED in B (event rate at least spike_factor times A's, normalised if the windows differ in length), and GONE. With no window arguments, B is the last window (default 1h) of the logs and A is the equal-length window just before it - ideal for 'what broke just now'.

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": "compare_windows"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNo+00:00
topNo
pathYes
levelNoERROR
windowNo1h
a_sinceNo
a_untilNo
b_sinceNo
b_untilNo
min_countNo
spike_factorNo
include_rotatedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioural burden. It does disclose meaningful traits: spike detection is rate-based and normalised when the windows differ in length, and the default A/B derivation. It says nothing about level/min_count filtering, rotated log handling, or the read-only nature, leaving real gaps for a mutation-free but multi-parameter analysis tool.

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 'What changed?', then the mechanics, then the default-behaviour case. Three sentences with little waste; only the parenthetical about normalisation is dense enough to require re-reading.

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?

An output schema exists, so return shape need not be explained, and the core comparison semantics are covered. But for a 12-parameter tool with zero schema descriptions and no annotations, the definition leaves too many knobs (min_count, include_rotated, level, tz) undocumented for confident invocation.

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 12 parameters, yet the description explains only `window` and `spike_factor` (and implicitly the four A/B bounds). `min_count`, `top`, `level`, `tz`, and `include_rotated` get no meaning anywhere, so an agent cannot know that min_count suppresses noise or that include_rotated defaults on.

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?

Uses a specific verb+resource ('Compare error templates') and defines the two windows and the three output classes (NEW, SPIKED, GONE), which is enough to separate it from error_clusters or search_logs. It never names a sibling, so an agent must infer the distinction rather than being told it.

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?

Gives a concrete usage scenario – 'ideal for what broke just now' – and explains the no-argument default behaviour (B = last `window`, A = equal-length preceding window). It stops short of saying when NOT to use it, e.g. versus error_clusters for a single-window view.

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