Skip to main content
Glama
bunnyiesart

mcp-opensearch

by bunnyiesart

opensearch_explain

Explains why a document matches or fails to match a query in OpenSearch, helping diagnose unexpected search results by providing reasoning for a specific document's relevance.

Instructions

Explain why a specific document matches (or doesn't match) a query.

Use after opensearch_search returns unexpected results and you have a known document ID. Get the doc ID from a prior search by including "_id" in source_fields (note: _id is a metadata field — use opensearch_search and read the _id from hits). Exact index name only — no wildcards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesExact index name, e.g. "wazuh-alerts-4.x-2026.06.24".
doc_idYesDocument _id as returned by a prior search.
query_stringNoLucene query to evaluate against the document (default "*").*

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description carries full burden. It adds constraints ('Exact index name only — no wildcards') and metadata context (_id field), but does not disclose authorization needs, side effects (likely read-only, but unstated), or rate limits.

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 concise sentences: purpose, usage context, constraint. Front-loaded with the core action, no wasted words.

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 output schema exists and schema coverage is high, description provides sufficient context for an agent to use the tool. Lacks mention of error scenarios or output structure, but output schema compensates.

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 covers 100% of parameters. Description adds clarifying context: 'Exact index name only' for index, 'as returned by a prior search' for doc_id, and Lucene query format for query_string. Adds value beyond schema.

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?

Clearly states the verb 'explain' and resource 'why a document matches or doesn't match a query'. Differentiates from siblings by specifying use after opensearch_search and requiring a known document ID.

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?

Explicitly states when to use ('after opensearch_search returns unexpected results') and prerequisites ('known document ID'). Does not explicitly state when not to use, but context implies it's only for analysis of specific docs.

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