Skip to main content
Glama
agrica

elasticsearch7-mcp

by agrica

Create or update a mapping

create_mapping
Idempotent

Add or update index mappings, creating the index when missing. Apply field properties while respecting that existing field types cannot be changed.

Instructions

Add or update fields on an index, creating the index if it does not exist. Elasticsearch cannot change the type of an existing field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesIndex name
mappingsYesMapping to apply, e.g. { properties: { tags: { type: 'keyword' } } }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate idempotent, non-read-only, and non-destructive behavior. The description adds valuable constraints beyond annotations, especially the critical limitation that 'Elasticsearch cannot change the type of an existing field', which helps agents anticipate failures.

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?

Two tightly written sentences. The first conveys the core action and index-creation behavior, and the second adds the most important caveat. There is no filler or repetition.

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?

For a two-parameter tool with a clear schema, the description covers the main behavioral caveat and typical usage. It does not describe the response shape, but given no output schema and the simplicity of the operation, the description is largely sufficient.

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

Parameters3/5

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

Schema description coverage is 100%, with both parameters documented well; the mappings parameter even includes an example shape. The description itself adds no additional parameter-level detail, so the baseline of 3 is appropriate.

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 states a specific verb ('Add or update') and resource ('fields on an index') and clarifies that it can create the index if needed. This clearly differentiates it from sibling tools like get_mappings or create_index.

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?

The description gives clear context: use this tool to mutate mappings, including when the index does not yet exist. It does not explicitly name alternatives or state when not to use it, but the operational scope is clear enough to guide selection.

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