Skip to main content
Glama

Compare periods

compare_periods
Read-onlyIdempotent

Compare two Graylog log periods (default last hour vs prior) to surface new, increased, gone, or decreased error groups normalized per hour.

Instructions

Compare two periods (default: last window vs the one before; or around split_at). Lists groups that are new, increased, gone or decreased, normalised per hour. Defaults to errors only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoGroups to return
queryNoExtra Lucene filter
windowNoLength of each period when using split_at or the default1h
streamsNoStream titles or ids to search in; all streams when omitted
group_byNo'exception', 'logger', 'source' or any fieldexception
instanceNoGraylog instance (environment) from list_instances, e.g. 'staging' or 'prod'; the default instance when omitted
split_atNoPoint in time (e.g. a deploy); compares [split-window, split] with [split, split+window]
current_toNoExplicit current period end; default now
baseline_toNoExplicit baseline end
errors_onlyNoAND the configured error query (default true)
current_fromNoExplicit current period start
baseline_fromNoExplicit baseline start

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered; the description adds real value by disclosing that results are normalised per hour, bucketed into new/increased/gone/decreased groups, and filtered to errors by default.

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?

Three tight sentences that front-load the core operation, then the split_at variant, then the output categories and default filter. No filler, though the parenthetical could be slightly cleaner.

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 12-parameter, no-output-schema tool, the description covers the default time basis, the split_at alternative, the grouping output, normalisation, and the errors-only default. It leaves period-length details to the schema, which is reasonable given 100% coverage.

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 coverage is 100%, so the schema already documents all 12 parameters including split_at, window, and errors_only. The description restates the default window comparison and split_at semantics, which reinforces but does not meaningfully extend the schema.

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 (compare) and resource (two periods of grouped log data), and clarifies the default comparison basis and the split_at variant. It does not name the closest sibling (detect_changes or error_summary), so an agent must still infer when to prefer this over those.

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?

It explains the default behavior (last window vs the one before, or around split_at) and the errors-only default, which implies typical usage, but it never says when to choose this tool over detect_changes, error_summary, or log_histogram.

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