Skip to main content
Glama
opensearch-project

opensearch-mcp-server-py

Official

SearchIndexTool

Search an OpenSearch index using query DSL. Provide index name, query, and optional parameters to retrieve matching documents.

Instructions

Searches an index using a query written in query domain-specific language (DSL) in OpenSearch. PREREQUISITE: You need to know the mappings of the index before constructing queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opensearch_urlYesOpenSearch endpoint URL.
opensearch_usernameNoUsername for basic authentication.
opensearch_passwordNoPassword for basic authentication.
opensearch_no_authNoIf true, connect without authentication.
aws_regionNoAWS region for IAM/Serverless authentication.
aws_iam_arnNoIAM role ARN for role-based authentication.
aws_profileNoAWS profile name for authentication.
aws_opensearch_serverlessNoIf true, use OpenSearch Serverless service.
opensearch_ssl_verifyNoIf false, disable SSL certificate verification.
opensearch_timeoutNoConnection timeout in seconds.
indexYesThe name of the index to search in
query_dslYesThe search query in OpenSearch query DSL format. For keyword-type fields (mapping shows "type": "keyword"), use field name DIRECTLY - do NOT add .keyword suffix. For text-type fields with .keyword subfields, use the .keyword suffix for exact matches. For date/time range queries, MUST include "format" parameter (commonly "format": "strict_date_optional_time||epoch_millis"), e.g. {"range": {"timestamp": {"gte": "2025-12-29T17:15:12Z", "lte": "2025-12-30T08:15:12Z", "format": "strict_date_optional_time||epoch_millis"}}}; if using non-ISO formats, adjust "format" accordingly.
formatNoOutput format: "json" or "csv"json
sizeNoNumber of search results to return. The maximum allowed value is 100, unless overridden by configuration.
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions it is a search operation, which implies read-only, but does not explicitly state whether it modifies data, requires specific permissions, or has rate limits. The behavioral disclosure is minimal.

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 two sentences and includes a prerequisite. It is concise and front-loaded with the core purpose. However, it could be slightly more structured with separate sections, but it is efficient.

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?

Given the complexity (14 parameters, 3 required, no output schema), the description is incomplete. It does not explain the return format, pagination, error handling, or how to use it in conjunction with sibling tools. The prerequisite is useful but insufficient for a comprehensive understanding.

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 description coverage is 100%, so baseline is 3. The description adds significant value for the 'query_dsl' parameter with detailed instructions on .keyword suffix and date format, which goes beyond the schema's description. Other parameters mostly repeat schema info, but the query_dsl guidance elevates this score.

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 it searches an index using OpenSearch query DSL, which is a specific verb and resource. However, it does not differentiate from sibling tools like CountTool or MsearchTool, which also operate on indices.

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?

The description includes a prerequisite about knowing index mappings, which provides some usage guidance. However, it does not mention when to use this tool versus alternatives like CountTool or ExplainTool, nor does it specify 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/opensearch-project/opensearch-mcp-server-py'

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