Skip to main content
Glama
cr7258

Elasticsearch MCP Server

index_document

Create or update a document in an Elasticsearch index. Provide index name, document data, and optional ID and cluster.

Instructions

Creates or updates a document in the index.

Args: index: Name of the index document: Document data id: Optional document ID cluster: Optional cluster name. Uses the default cluster if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
documentYes
idNo
clusterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'creates or updates' but does not clarify whether updates are additive, overwrite existing fields, or replace the entire document. No side effects, auth requirements, or error behavior are mentioned.

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 concise, using a structured docstring format with args listed. Every sentence serves a purpose, and the main action is front-loaded. There is no redundancy or fluff.

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

Completeness3/5

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

Given there is an output schema (not shown), the lack of return value explanation is acceptable. However, the description is missing important context: whether the tool replaces or merges, what happens on duplicate ID, and error conditions. It is minimally complete for a simple operation but could be improved for a mutation tool.

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?

The description adds meaningful parameter semantics beyond the schema: it names the 'index', 'document', optional 'id', and 'cluster' with a default behavior ('Uses the default cluster if omitted'). This is helpful given the schema has zero property descriptions (0% coverage).

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?

The description clearly states the tool's purpose: 'Creates or updates a document in the index.' This specific verb-resource combination effectively distinguishes it from sibling tools like delete_document, get_document, and search_documents.

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 lists arguments but provides no guidance on when to use this tool versus alternatives. There is no mention of prerequisites, appropriate contexts, or when not to use this tool. Sibling names like create_index and delete_by_query imply some boundaries, but explicit guidance is missing.

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/cr7258/elasticsearch-mcp-server'

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