Skip to main content
Glama
vanovarderesyan

Elastic MCP Server

search_logs

Find and analyze log entries from Elasticsearch using time ranges, service, field, and free-text filters for troubleshooting.

Instructions

Search logs via Kibana with filters and time ranges. Supports service filtering by kubernetes.container.name, free-text queries, and field filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd time, e.g., "now"
fromNoStart time, e.g., "now-1h" or "2026-04-07T10:00:00Z"
sizeNoMax results (default 50)
sortNoSort order on time fielddesc
indexNoIndex pattern, e.g., "logs-*", "filebeat-*", or "production-my-service*"*
queryNoFree text query string (Lucene syntax). Searches the message field.
filtersNoKey-value field filters, e.g., {"level": "error"}. For JSON log level inside message, use messageLevel instead.
serviceNoFilter by kubernetes.container.name, e.g., "my-service"
timeFieldNoTimestamp field name@timestamp
messageLevelNoFilter by log level inside JSON message field, e.g., "error", "warn", "info"
messageQueryNoSearch text within the message field (match_phrase), e.g., "Too Many Requests" or "Error syncing"
excludeHealthChecksNoExclude health/liveness/readiness check logs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden. It does not state whether this operation is read-only, what kind of results are returned, how pagination works, or any limits or side effects. The phrase 'Search logs' implies a read operation, but important behavioral details like result format and result limits are missing.

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 a single, tightly written sentence that front-loads the core action and then lists supported capabilities without redundancy. Every phrase earns its place.

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?

With 12 parameters, no annotations, and no output schema, the description leaves important gaps: it does not specify what the tool returns (e.g., raw log entries), how to interpret results, or how to distinguish it from aggregate_logs. For a high-complexity tool, this level of context is insufficient.

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 documents every parameter. The description only summarizes the filter options (service, free-text, field filters) without adding new semantic detail beyond what the schema already provides. It meets the baseline but does not elevate it.

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: searching logs via Kibana with filters and time ranges. It distinguishes itself from sibling tools like list_indices and aggregate_logs by focusing on log search rather than listing, mapping, or aggregation.

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?

The usage is implied through the description of filtering and time-range capabilities, but there is no explicit guidance on when to choose this tool over aggregate_logs or get_document. No alternatives or exclusions are mentioned.

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