Skip to main content
Glama

Search logs

search_logs
Read-onlyIdempotent

Query Graylog log messages with a Lucene query to debug issues. Returns compact, redacted lines with a 'ref' for follow-up. Default range: last 15 minutes.

Instructions

Search log messages with a Lucene query. Returns compact, redacted lines with a 'ref' (index/id) usable by get_message and context_around. Default range: last 15 minutes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNo'timestamp:desc' (default), 'asc', or '<field>:asc|desc'timestamp:desc
limitNoMessages to fetch (capped by config)
queryNoLucene query, '*' for everything*
rangeNoRelative range ending now (or at to_time): '15m', '2h', '1d', '1h30m'
fieldsNoFields to return; default timestamp/source/level/message, ['*'] for all
offsetNoSkip this many messages (use next_offset)
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
dedup_linesNoGroup lines that only differ in numbers/ids/timestamps (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the bar is lower. The description adds useful behavior: results are 'compact, redacted lines' with a 'ref', and it discloses the default range of last 15 minutes, which is not in the schema. It doesn't mention rate limits or the dedup default, but this is solid context beyond annotations.

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?

Three short sentences, front-loaded with the verb and query language, then output format, then default behavior. No filler and every clause carries information.

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?

Covers purpose, output shape, downstream usage, and default range for a read-only, idempotent search tool with a fully documented schema and no output schema. It does not explain pagination (offset/next_offset) or the default field set, but those are in the schema and the core call contract is clear.

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%, so the schema already documents all 11 parameters thoroughly. The description only adds the default range behavior and the 'ref' output concept; it doesn't explain query syntax or field filtering beyond what the schema provides. Baseline 3 is correct when the schema does the heavy lifting.

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?

States a specific verb (Search) and resource (log messages) plus the query dialect (Lucene). The return type is described with concrete fields ('ref', index/id), giving it more precision than siblings like count_logs or log_histogram.

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?

Names the downstream tools that consume the 'ref' (get_message, context_around) and states the default range, which helps the agent know what this tool is for. It does not explicitly contrast with count_logs or log_histogram, so it's a clear context but not full alternative routing.

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