Skip to main content
Glama
elasticsearch-mcp

elasticsearch-mcp

get_mappings

Read-only

Retrieve field names and types for an Elasticsearch index or pattern before writing search or ES|QL queries to ensure accurate field references.

Instructions

Get the field names and types of an index or pattern. Read them before writing a search or ES|QL query.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "index": "<index>"
    },
    "name": "get_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the description is not carrying the safety burden. It adds useful return-content context (field names and types), but says nothing about pattern expansion behavior, aliases, or what happens when the index does not exist — gaps that matter for an introspection call.

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 sentences, zero waste, with the resource definition front-loaded and the usage cue second. Nothing is padded or redundant.

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 single-parameter read-only introspection tool with no output schema, the definition covers purpose, return content, and the motivating workflow. It is only slightly incomplete in not addressing failure or pattern-expansion behavior, which is a minor gap at this complexity level.

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 coverage is 0% and the only parameter is documented merely as a string titled 'Index'. The description adds real meaning by saying the value may be an 'index or pattern', which the schema does not convey. However, it never specifies pattern syntax (wildcards, comma lists) or whether multiple indices are permitted, so it only partly compensates for the coverage gap.

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 names a specific verb and resource ('Get the field names and types of an index or pattern'), which is concrete enough to distinguish it from search/esql siblings that consume this information rather than return it. It stops short of explicitly contrasting itself with any named sibling, so it lands at a clear-but-undifferentiated 4.

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 sentence 'Read them before writing a search or ES|QL query' gives an explicit when-to-use condition tied to two concrete downstream tasks. It does not state when not to use it or name an alternative path, so it falls short of a 5.

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