Skip to main content
Glama
Rbedoyag

Elasticsearch/OpenSearch MCP Server

by Rbedoyag

search_documents

Search for documents in Elasticsearch/OpenSearch clusters by specifying an index and query body to retrieve relevant data.

Instructions

        Search for documents.
        
        Args:
            index: Name of the index
            body: Search query
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
bodyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.6

TDQS

D1.6/5.0
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states the action ('Search for documents') without any details on permissions, rate limits, pagination, error handling, or what the search returns (e.g., results format, relevance scoring). This leaves critical behavioral aspects unspecified.

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

Conciseness3/5

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

The description is brief with two sentences, which is appropriately sized. However, it is not front-loaded with key information; the first sentence is vague, and the args section lacks detail. While concise, it under-specifies rather than being efficiently informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (search operation with 2 parameters including a nested object), lack of annotations, and no output schema, the description is severely incomplete. It fails to explain what the tool does beyond the name, how to use parameters effectively, or what to expect in return. This is inadequate for a search tool in a document management system.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists 'index' and 'body' as args but provides no semantic meaning beyond their names. For example, it does not explain what an 'index' is in this context, what the 'body' should contain (e.g., query DSL, filters), or examples of valid values. This adds minimal value over the bare schema.

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

Purpose2/5

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

The description states 'Search for documents' which is a tautology of the tool name 'search_documents'. It does not specify what type of documents, what search capabilities exist, or how it differs from sibling tools like 'get_document' or 'index_document'. The purpose is stated but lacks specificity and differentiation.

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

Usage Guidelines1/5

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

There is no guidance on when to use this tool versus alternatives. The description does not mention prerequisites (e.g., needing an existing index), exclusions, or comparisons to siblings like 'get_document' (for retrieval by ID) or 'list_indices' (for browsing). Usage context is entirely missing.

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