Skip to main content
Glama
cr7258

Elasticsearch MCP Server

analyze_text

Analyze text to see how it is tokenized by Elasticsearch analyzers, helping debug search queries and understand document matching.

Instructions

Analyze text to see how it would be tokenized.

Use this tool to understand how Elasticsearch/OpenSearch tokenizes and transforms text using analyzers. This is essential for debugging search queries and understanding why certain documents match or don't match.

Args: text: The text to analyze index: Index name to use its configured analyzer. If not specified, uses cluster-level analysis with built-in analyzers only. analyzer: Name of the analyzer to use (e.g., 'standard', 'korean', 'korean_search'). If index is specified, you can use custom analyzers defined in that index. tokenizer: Tokenizer to use for custom analysis chain. Cannot be used together with 'analyzer'. filter: List of token filters to apply (e.g., ['lowercase', 'stop']). Used with 'tokenizer' for custom analysis chain. char_filter: List of character filters to apply before tokenization. Used with 'tokenizer' for custom analysis chain. explain: If True, returns detailed information about each token including all token attributes and filter transformations. Useful for debugging complex analyzer chains. attributes: List of token attributes to return when explain=True (e.g., ['keyword', 'type']). If not specified, all attributes are returned. cluster: Optional cluster name. Uses the default cluster if omitted.

Returns: Dict containing 'tokens' array. Each token has 'token', 'start_offset', 'end_offset', 'type', and 'position' fields. With explain=True, returns detailed 'detail' object showing each filter's effect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
indexNo
analyzerNo
tokenizerNo
filterNo
char_filterNo
explainNo
attributesNo
clusterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden for behavioral traits. It explains how the tool works (tokenizes using analyzers), mentions conditional behavior (index vs no index, analyzer vs custom chain), and the explain option. It also describes return format. No contradictions, though it could mention that the tool is read-only.

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?

The description is well-structured with an intro paragraph, a detailed Args list, and Returns section. It is front-loaded with purpose. While slightly lengthy, every sentence adds value, making it concise for the complexity.

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?

Given the tool has 9 parameters and no annotations, the description covers most aspects: usage, parameter constraints, and return values. It might be missing some edge cases (e.g., behavior when both index and analyzer are omitted), but overall it is sufficiently complete for a complex tool.

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?

Schema description coverage is 0%, but the description thoroughly explains all 9 parameters: text, index, analyzer, tokenizer, filter, char_filter, explain, attributes, and cluster. It provides constraints (e.g., tokenizer cannot be used with analyzer) and usage context, adding significant meaning beyond the bare 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 clearly states the tool analyzes text to see how it would be tokenized, specifying the purpose for debugging search queries in Elasticsearch/OpenSearch. It distinguishes itself from sibling tools, which are all index/data stream management and search operations, making its unique functionality evident.

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 explicitly states when to use: to understand tokenization and debug search queries. While it does not explicitly state when not to use, the context is clear, and no alternative tools are mentioned among siblings, so the guidance is adequate.

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/cr7258/elasticsearch-mcp-server'

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