Skip to main content
Glama

Get index field mapping

index_mapping
Read-only

Inspect an index's field mapping to see every field name and its OpenSearch type before writing a DSL query.

Instructions

Return one index's field mapping: every field name and its OpenSearch type.

    Use this to learn what fields an index holds and how they are typed before
    writing a DSL query against it. To list which indices exist rather than inspect
    one index's schema, use list_indices. For Malcolm's non-standard field names
    across all indices, malcolm_field_search is easier than reading raw mappings.
    Returns the raw OpenSearch _mapping response; a non-existent index yields an
    OpenSearch error in the response body.

    A wildcard returns one mapping block per matching index rather than a
    merged one, and each block repeats the whole schema: "arkime_sessions3-*"
    costs roughly a megabyte of JSON, growing by another block every day
    Arkime opens a new index. Name ONE index when you only need the schema —
    the blocks are near-identical. The types it reports are OpenSearch's own
    (keyword, long, text), while malcolm_field_search reports Malcolm's names
    for the same fields (string, integer) — so come here only when the
    OpenSearch type is what you need.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesExact index name or pattern to fetch the mapping for, e.g. "arkime_sessions3-*". Accepts a wildcard.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, but the description adds substantial behavioral detail: it returns the raw OpenSearch _mapping response, non-existent index yields an error in the body, wildcard returns multiple blocks each repeating the schema with cost implications, and it explains the distinction between OpenSearch types and Malcolm's names. This goes far beyond the annotation safety profile.

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 well-structured and front-loaded with the core purpose, followed by practical usage guidance and caveats. Every sentence carries information: alternatives, return format, error behavior, wildcard cost, and type naming distinction. No filler or redundancy.

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

Completeness5/5

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

The description is fully complete for the tool's complexity. It covers the return type (raw _mapping), edge cases (non-existent index, wildcard), performance considerations (megabyte-scale response), relationships to sibling tools, and the type system mismatch. Given annotations, schema, and output schema, no critical aspect is missing.

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 input schema already covers the index parameter well (name, pattern, wildcard support). The description adds semantic value by explaining the consequences of using a wildcard (one mapping block per index, repeated schema, large payload) and advising to name one index unless absolutely necessary. This enriches understanding beyond the schema's basic field description.

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+resource+scope: 'Return one index's field mapping: every field name and its OpenSearch type.' This clearly states what the tool does and immediately distinguishes it from siblings by naming alternatives (list_indices, malcolm_field_search).

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

Usage Guidelines5/5

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

Explicit guidance is given: 'Use this to learn what fields an index holds and how they are typed before writing a DSL query against it.' It also provides clear when-not-to-use instructions, naming list_indices for discovering indices and malcolm_field_search for Malcolm's field names, plus a warning against wildcard usage unless needed.

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/nagameTW/mcp-server-malcolm'

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