Skip to main content
Glama
bunnyiesart

mcp-opensearch

by bunnyiesart

opensearch_search

Search OpenSearch indices using Lucene query syntax to retrieve full documents. Supports time range filtering, sorting, pagination, and field selection.

Instructions

Full-document retrieval using Lucene syntax (same as the Dashboards search bar).

Always pass source_fields to limit response size — 50 full docs ≈ 237 KB and will fill context quickly. Omitting from_ts/to_ts scans the full index history, which is slow and expensive; adding a time range reduces query time by up to 15×.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesIndex name or wildcard pattern, e.g. "wazuh-alerts-*".
limitNoMax documents to return (default 50, hard cap 200).
to_tsNoEnd time, UTC ISO 8601, e.g. "2026-06-24T00:00:00Z".
offsetNoPagination offset — skip this many documents before returning results (default 0). Increment by limit to page: offset=0 → page 1, offset=50 → page 2, etc.
from_tsNoStart time, UTC ISO 8601, e.g. "2026-06-23T00:00:00Z".
sort_dirNo"desc" = newest first (default), "asc" = oldest first.desc
ts_fieldNoTimestamp field name (default "@timestamp").@timestamp
sort_fieldNoField to sort by (default: ts_field).
query_stringNoLucene query, e.g. "rule.level:[12 TO *] AND agent.name:WIN-DC01". Use "*" for all documents.*
source_fieldsNoFields to include, e.g. ["agent.name", "rule.level", "@timestamp"]. Strongly recommended — omitting returns all fields.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Discloses concrete behavior: 50 full docs ≈ 237 KB, omitting time filters scans full index (slow/expensive), and adding time range reduces query time up to 15×. With no annotations, this adds significant behavioral context beyond mere functionality.

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?

Two well-structured sentences with no fluff. First sentence defines purpose, second provides critical usage advice. Every word earns its place.

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?

Given 10 parameters and output schema, the description covers the core purpose and most critical performance considerations. Output schema makes return format documentation unnecessary. A minor omission is lack of guidance on offset pagination, but offset is well-described in schema.

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?

Schema coverage is 100%, so baseline is 3. The description adds meaning by explaining why source_fields and from_ts/to_ts are important for performance and context usage, going beyond their 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?

Clearly states 'Full-document retrieval using Lucene syntax', which is specific and distinguishes from sibling tools like opensearch_count or opensearch_stats that do not return full documents. However, it does not explicitly mention when to use this over alternatives.

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?

Provides important best practices (pass source_fields to limit size, add time range to reduce cost) but does not explicitly state when to use this tool versus alternatives or when not to use it.

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/bunnyiesart/mcp-opensearch'

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