Skip to main content
Glama

query_logs

Query OpenSearch logs with Lucene queries, filter by time range, HTTP status, and response time, and return a compact log table.

Instructions

Query OpenSearch directly and return compact log table. Requires OPENSEARCH_URL env var.

Args: index: OpenSearch index pattern (e.g. "logs-json-"). query: Lucene query string (e.g. "status:500 AND logs.requestFirstLine:/api/users*"). time_from: ISO timestamp lower bound (e.g. "2026-06-03T01:00:00Z"). time_to: ISO timestamp upper bound. limit: Max entries to fetch (default 50). status_filter: Client-side filter by HTTP status after fetch. min_response_time: Client-side filter by min response time (ms).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
limitNo
queryNo
time_toNo
time_fromNo
status_filterNo
min_response_timeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries full burden. It discloses client-side filtering (status_filter, min_response_time) and parameter defaults, but does not mention pagination, error behavior, or performance implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately long with a summary and bullet-style args. It is structured but could be more concise; the first sentence effectively summarizes the tool's function.

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?

All 7 parameters are described with examples, and the env var requirement is noted. An output schema exists, so the lack of return value description is acceptable. Missing details on error handling or rate limits but sufficient for basic usage.

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?

Schema coverage is 0%, and the description provides detailed semantics for each parameter, including examples and default values (e.g., Lucene query format, ISO timestamps). Fully compensates for missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries OpenSearch and returns a compact log table. However, it does not differentiate from siblings like read_logs or summarize_logs, lacking specificity on when this tool is preferred.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It mentions the OPENSEARCH_URL requirement but does not specify when not to use it or provide example contexts.

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/nrapendra-singh/mcp-log-pruner'

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