Skip to main content
Glama
jperelli

Graylog MCP Server

by jperelli

analyze

Aggregate log messages by top field values to reveal failures, count repeats, and spot volume spikes. Use substring matching to discover exact field values for precise filtering.

Instructions

Aggregate matching messages by the top values of a field instead of returning raw lines. Optionally add a time histogram of match volume. Three main uses: (1) WHAT IS FAILING — aggregate on a message field (msg, or whatever short summary field list_fields reveals) to collapse a thousand repetitions of one error into one row with a count; on name/container_name/source to see who is emitting them. This is far cheaper and more informative than reading the same lines via search. (2) WHEN — set histogramInterval to see whether volume spiked. (3) DISCOVER A VALUE you are about to filter on — set valueContains to find the real name of a namespace/pod/service rather than guessing it (Elasticsearch rejects a leading wildcard, so field:*foo* is an error and this is the only way to substring-match a value). Pass streams:"*" to aggregate across every readable stream in one request — cheap here, and the reliable way to see a service whose stream removes its matches from the Default Stream.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoAbsolute window end, ISO-8601 UTC. Requires `from`.
fromNoAbsolute window start, ISO-8601 UTC (e.g. "2026-07-11 14:00:00"). Requires `to`. Overrides the relative range.
sizeNoNumber of top values to return. Default: 20.
fieldYesField to break down by, e.g. "source", "namespace_name", "container_name", "level". Confirm it exists with list_fields if you have not seen it in a result.
queryNoLucene query, e.g. "level:ERROR", "error OR exception", "source:api-*". Use "*" for everything. Default: "*".
streamsYesComma-separated Graylog stream IDs (from list_streams), or "*" for every stream the token can read. Required. Prefer "*" unless you already know the stream: the Default Stream ("000000000000000000000001") is NOT "everything" — most clusters route each service to its own stream that REMOVES its matches from the Default Stream, so searching only the Default Stream silently misses those services.
instanceNoGraylog instance to query. Active: "instance_1". Default: "instance_1".
valueContainsNoCase-insensitive substring filter on the returned VALUES, applied locally over a wide bucket scan. Use to find a value you only half-know, e.g. field:"namespace_name" valueContains:"catalogue" to learn the exact namespace before filtering on it.
histogramIntervalNoIf set, also return a time histogram of total match counts at this bucket size.
searchTimeRangeInSecondsNoRelative time range in seconds, ending now. Default: 900 (15 min). Ignored if from/to are set.
Behavior5/5

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

With no annotations, the description fully carries the burden and does so admirably: it explains aggregation behavior, optional histogram, local substring filtering, and stream semantics, including the crucial caveat about the Default Stream and leading wildcard restrictions. It discloses these traits without contradiction.

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?

The description is long but exceptionally well-structured with numbered use cases, and every sentence serves a purpose—from explaining the main function to providing operational warnings. It is front-loaded with the core purpose and remains focused without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with no output schema and no annotations, the description covers the essential operational context: what it does, when to use it, how parameters behave in practice, and caveats about streams and wildcard queries. It adequately compensates for missing structured metadata.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description significantly enriches parameter understanding by tying valueContains to a discovery use case, histogramInterval to a timing use case, and field to a failure-analysis use case. It adds contextual meaning beyond the schema entries.

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 the tool aggregates matching messages by top field values rather than returning raw lines, with a specific verb-resource relationship. It further distinguishes itself from sibling tools like search by explaining it collapses repetitions into counts, making it more informative and cheaper.

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

Usage Guidelines5/5

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

The description explicitly outlines three use cases (what is failing, when, discover a value) and directly contrasts with search ('far cheaper and more informative than reading the same lines via search'). It also provides guidance on when to use streams:"*" and warns against pitfalls like the Default Stream, offering clear situational advice.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jperelli/graylog-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server