Skip to main content
Glama

Top values

top_values
Read-onlyIdempotent

Rank Graylog field values by exact count and percentage to identify dominant sources, status codes, or user agents in a time range.

Instructions

Top N values of a field with exact counts and percentages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesField to group by, e.g. source, http_status, user_agent
limitNoNumber of values
queryNoLucene query, '*' for everything*
rangeNoRelative range ending now (or at to_time): '15m', '2h', '1d', '1h30m'1h
streamsNoStream titles or ids to search in; all streams when omitted
to_timeNoAbsolute end, same formats as from_time; default now
instanceNoGraylog instance (environment) from list_instances, e.g. 'staging' or 'prod'; the default instance when omitted
from_timeNoAbsolute start: ISO 8601 or 'YYYY-MM-DD HH:MM' in the instance timezone; overrides range

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is fully covered. The description adds only that output includes exact counts and percentages, which is modest extra context and says nothing about aggregation cost, limits, or missing-field behavior.

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?

One short, front-loaded sentence with zero padding. It is efficient, though arguably too sparse to count as optimally structured for an 8-parameter aggregation tool.

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?

For an aggregation tool with 8 parameters but no output schema, the description at least signals the shape of the result (counts and percentages). However it omits any guidance on limiting large result sets or on the query/range/time relationships, leaving the schema to carry the whole load.

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% and all 8 parameters carry clear descriptions with examples, defaults, and bounds, so the schema does the heavy lifting. The description adds no syntax, interaction, or precedence detail (e.g. from_time overriding range) beyond 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 operation (top N values of a field) plus the return semantics (exact counts and percentages), so an agent can tell it apart from count_logs or log_histogram. It does not, however, name any sibling or scope the tool to a data source beyond the schema's implicit fields.

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 gives no when-to-use or when-not-to-use guidance and no alternatives. It never hints at how this differs from count_logs, log_histogram, or list_fields, so the agent must infer selection from the name alone.

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