Skip to main content
Glama
dmayan-ss

mcp-opensearch

by dmayan-ss

search

Run read-only OpenSearch Query DSL queries against specified indexes to retrieve matching documents. Specify index and query body, optionally limit result size for log analysis and troubleshooting.

Instructions

Execute a read-only search query against an index using OpenSearch Query DSL.

The query_body must be a valid JSON string representing the query portion. Example: {"query": {"match": {"message": "error"}}, "sort": [{"@timestamp": "desc"}]}

Args: index: Index name or pattern to search (e.g. 'filebeat-*'). query_body: JSON string with the OpenSearch Query DSL body. size: Maximum number of results to return (default 20, max 100).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
indexYes
query_bodyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

The description discloses that the operation is read-only and states the size limit and default, which are useful behavioral traits. However, it does not describe the return format, pagination behavior, error conditions, or any additional side effects, leaving meaningful gaps given that no annotations are present.

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: an opening one-sentence purpose, a necessary JSON constraint, and a clean Args block. No filler or redundant content is present, and the most important information is front-loaded.

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?

The description covers the essential invocation details: parameters, formats, defaults, and constraints, and an output schema exists so return-value documentation is not required. It is slightly incomplete only because it does not guide the agent toward alternative sibling tools when appropriate.

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?

With zero schema description coverage, the description fully compensates: it explains index naming with an example pattern, defines query_body as a valid JSON query string with an illustrative example, and documents size's default and maximum. Every parameter receives meaningful usage detail.

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 identifies the verb (search), resource (an index), and mechanism (OpenSearch Query DSL), with a concrete example. However, it does not explicitly distinguish itself from siblings like count or get_document, which could also operate on indexes.

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?

The description gives no guidance on when to use this tool versus alternatives such as count, get_document, or the other index-level tools. The only contextual hint is 'read-only', which implies safe usage but does not explain when another tool would be more appropriate.

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