Skip to main content
Glama
jrvalinas

elastic-mcp

by jrvalinas

Get Logs For Service

get_logs_for_service

Retrieve logs for a specified service within a given time range, with optional filtering by log level and message exclusion to focus on relevant entries.

Instructions

Fetch logs for a service in a chosen time range. Use exclude_messages to filter out logs matching wildcard patterns (e.g. ["/health", "heartbeat"]).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
lastNo
levelNo
limitNo
startNo
serviceYes
exclude_messagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of explaining behavior. It only states that logs are fetched and can be filtered by excluded messages, but it does not disclose ordering, pagination, time-boundary interpretation, output format, or any side effects/permissions. This is insufficient for a tool with no annotation support.

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 compact and well-structured: two sentences, the first stating the core action and the second giving a concrete filter example. No redundant words or 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?

Despite having an output schema, the description is not complete enough for an agent to correctly use the tool. It leaves multiple parameters ambiguous, lacks guidance on how the time-range parameters interact, and does not clarify the relationship to sibling log-fetching tools. The output schema does not replace the missing semantic context.

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

Parameters2/5

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

Schema description coverage is 0% and there are 7 parameters. The description only meaningfully explains exclude_messages and vaguely refers to a time range, leaving service, start, end, last, level, and limit unexplained. This does not compensate for the low schema coverage.

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 verb 'fetch', the resource 'logs for a service', and the key scope 'in a chosen time range'. This distinguishes it from siblings like get_latest_logs or get_logs_by_correlation_id, which target different log retrieval modes.

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?

It provides some usage guidance by explaining how to use exclude_messages with wildcard patterns, but it does not explicitly state when to choose this tool over alternatives such as get_latest_logs or get_logs_by_correlation_id. The 'chosen time range' hint implies one use case, but no clear when-to-use or when-not-to-use guidance is given.

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