Skip to main content
Glama

Get index field mapping

index_mapping
Read-only

Retrieve an index's field names and OpenSearch types to understand its schema before writing a DSL query. Specify a single index to avoid oversized wildcard mapping responses.

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 is
    reported as an error carrying OpenSearch's index_not_found_exception.

    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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0
  2. Removedv0.2.0
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, non-destructive, open-world), and the description adds substantial context beyond that: wildcard behavior returns one block per index rather than a merged one, cost estimates (~1MB, growing daily), error behavior (index_not_found_exception), raw response format, and the type-naming distinction vs malcolm_field_search. Rich disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and routing guidance, and every sentence carries useful information. It is on the long side and the type-naming explanation could be tightened slightly, but there is little filler.

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?

Even though an output schema exists (so return values needn't be explained), the description still covers the raw response shape, error case, and wildcard edge case. Nothing an agent needs to call it correctly 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?

Schema coverage is 100%, so the baseline is 3, but the description goes beyond the schema by explaining the concrete cost and shape consequence of using a wildcard and advising to name ONE index when only the schema is needed. This adds real decision-relevant meaning to the single parameter.

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 opening states a specific verb and resource: 'Return one index's field mapping: every field name and its OpenSearch type.' It also distinguishes itself from siblings by name (list_indices, malcolm_field_search), so an agent can route correctly without opening any schema.

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 when-to-use ('before writing a DSL query against it'), when-not ('to list which indices exist... use list_indices'), and a named alternative for the non-standard field-name case ('malcolm_field_search is easier than reading raw mappings'). Routing conditions are fully spelled out.

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