Skip to main content
Glama
jagadeesh52423

Graylog MCP Server

get_surrounding_messages

Retrieve log messages contextual to a target message using its ID or timestamp. See surrounding events to understand the sequence of actions.

Instructions

Get messages surrounding a specific message. Provide messageId (preferred) or messageTimestamp to identify the target message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of messages to return. Default: 50
queryNoAdditional query filter to narrow context
fieldsNoComma-separated field names to return, or '*' for all fields. Default: returns key fields only (timestamp, gl2_message_id, source, env, level, message, logger_name, thread_name, PODNAME)
filtersNoField filters (e.g. {"env": "marketplace_loki", "level": 7})
messageIdNogl2_message_id of the target message (preferred). The timestamp will be looked up automatically.
streamIdsNoOptional stream IDs to scope the search. Use 'list_streams' to get available stream IDs.
exactMatchNoIf true (default), wraps the query in quotes for exact match. Set to false for fuzzy/wildcard search.
messageTimestampNoISO timestamp of the target message (fallback if messageId is not available)
surroundingSecondsNoTime window in seconds (± around the timestamp). Default: 5
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only mentions the preferred identifier method but does not disclose side effects, return format, or behavior when the target is not found. This is insufficient for a tool that likely performs a read operation; the agent is left guessing about safety and edge cases.

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 two sentences, front-loaded with the primary purpose and followed by essential identifier guidance. Every word earns its place with no filler.

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

Completeness2/5

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

This is a complex tool with 9 parameters, nested objects, and no output schema or annotations. The description does not explain the semantics of 'surrounding' (how the time window works), the structure of the returned messages, or what happens if the target message is ambiguous. It is not complete enough for an agent to understand the full behavior.

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

Parameters4/5

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

The schema covers all parameters with descriptions (100% coverage), so the baseline is 3. The description adds value by specifying that messageId is 'preferred' and messageTimestamp is a fallback, which is not immediately clear from the schema alone. This improves parameter understanding.

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's function: 'Get messages surrounding a specific message.' This is a specific verb+resource combination that distinguishes it from sibling tools like search_events or fetch_graylog_messages, which focus on broader searches rather than contextual retrieval around a single message.

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?

The description provides clear usage context: 'Provide messageId (preferred) or messageTimestamp to identify the target message.' It tells the agent exactly how to invoke the tool. However, it does not explicitly mention when not to use it or name alternatives, so it falls short of a 5.

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/jagadeesh52423/graylog-mcp'

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