Skip to main content
Glama
dmayan-ss

mcp-opensearch

by dmayan-ss

get_index_mapping

Get the field mapping (schema) for an OpenSearch index, listing all fields and their data types. Use it to understand index structure before querying or analyzing logs.

Instructions

Get the field mapping (schema) for an index, showing all fields and their types.

Args: index: Name of the index (e.g. 'filebeat-2024.01.15' or 'logs-*').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add a behavioral detail—'showing all fields and their types'—and the parameter examples suggest support for wildcard index patterns ('logs-*'). However, it does not disclose edge-case behavior such as missing indices or multi-index expansion details.

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 tight and front-loaded: the first sentence states the purpose, and the Args section directly supports the single parameter. There is no redundant or filler text.

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 simple one-parameter read tool, the description captures the core input and output semantics, especially with an output schema already present. The main gap is the lack of usage guidance and edge-case behavior, but the tool's simplicity keeps the description reasonably complete.

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

Parameters5/5

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

The schema's index parameter has no description, leaving 0% schema coverage. The description compensates fully by naming the parameter ('Name of the index') and providing two illustrative examples, including a wildcard pattern, which adds practical meaning beyond the schema.

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 opens with a specific verb and resource: 'Get the field mapping (schema) for an index' and adds what it returns, 'showing all fields and their types.' This clearly distinguishes it from siblings like get_document, search, and list_indices.

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 gives no guidance on when to choose this tool over alternatives, nor does it mention any exclusions or prerequisites. It only describes the action and parameter, leaving the agent to infer appropriate usage from the purpose itself.

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