Skip to main content
Glama
agrica

elasticsearch7-mcp

by agrica

Analyze text

analyze
Read-onlyIdempotent

Inspect how Elasticsearch tokenizes text into terms to diagnose why a search returns no results. Use an index field to apply its real analyzer and see exactly what the query must produce to match.

Instructions

Show the terms a text is broken into, which is what a query must produce to match. Pass field with index to use the analyzer that index really applies to that field; that is the form that explains a search returning nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to analyze
fieldNoUse this field's analyzer, taken from the index mapping.
indexNoIndex whose analyzers to use. Required with field.
analyzerNoNamed analyzer to test instead, e.g. standard, french.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so no safety disclosure is missing. The description adds semantic behavior: output is the token terms a query must match, and using field/index routes to the real per-field analyzer. It neither contradicts annotations nor reveals side-effect caveats beyond that, so a mid score is appropriate.

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 compact sentences, the first states the core function and the second adds the key usage nuance. No filler or repetition of schema details.

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 read-only diagnostic with one required parameter, the description plus schema covers what the tool does, how to choose a real-field analyzer, and why it matters for debugging searches. No output schema exists, but the description directly states the observable result ('terms a text is broken into'). It doesn't discuss response shape details, but they are unnecessary for basic invocation.

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 parameter basics are already documented. The description adds the important combination rule (field must be paired with index) and explains that the analyzer is taken from the index mapping, which is value beyond individual property docs. It earns an above-baseline score.

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 names a concrete operation — showing the tokenized terms produced from text — and ties it to query matching, so an agent understands what analyze returns. It also distinguishes the field/index form from a standalone analyzer test. This goes well beyond the vague title.

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?

It gives explicit guidance on the field-index combination as the way to use the actual analyzer applied by the index, and states this is the form that explains an empty search result. It doesn't explicitly enumerate alternatives or when to use the analyzer parameter, but the context is sufficient for a user to choose sensibly.

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