Skip to main content
Glama
ed-smartass

esmole-mcp

by ed-smartass

es_search

Search Elasticsearch indices with query DSL, pagination, sorting, aggregations, and source projection; returns status and body or root-cause errors.

Instructions

Search an index. Wraps POST /{index}/_search. query is the query DSL only; sort, from, search_after, track_total_hits, highlight, script_fields and source (_source) map to the same-named body keys. size defaults to 10; with aggs and no query it is forced to 0. Page with from+size or sort+search_after. Use source to project fields and keep responses small. Returns {status, body}; a 4xx/5xx is an error with the ES root cause.

Input Schema

NameRequiredDescriptionDefault
aggsNo
fromNo
sizeNo
sortNoe.g. [{"@timestamp": "desc"}]
indexYesindex, alias, comma list or wildcard, e.g. logs-*,metrics
queryNoquery DSL only, e.g. {"bool": {...}}
sourceNo_source projection: list of fields or false
highlightNo
connectionYes
search_afterNosort values of the last hit
script_fieldsNo
track_total_hitsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the size default of 10, the non-obvious rule that aggs with no query forces size to 0, the {status, body} return envelope, and that 4xx/5xx surfaces an ES root cause error. Authentication/connection assumptions are the main undisclosed trait.

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?

Dense and front-loaded: endpoint mapping first, then parameter mapping, then pagination and projection guidance, then return/error behavior. Every clause conveys a distinct fact with no filler.

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 12-parameter nested-object tool with no output schema and no annotations, the description covers return shape, error semantics, defaulting behavior, and param mapping. The remaining gap is the relationship to es_request and the meaning of the required connection parameter.

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 only 42%, and the description compensates by mapping the undocumented body keys (sort, from, search_after, track_total_hits, highlight, script_fields, _source) and clarifying that query is DSL only, not a full body. It omits the size ceiling of 1000 and leaves the connection parameter entirely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search an index') and immediately grounds it in the underlying endpoint ('Wraps POST /{index}/_search'), so an agent knows exactly what it does. It does not explicitly differentiate itself from the sibling es_request, which could also issue a _search body, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description gives operative advice on how to use the tool ('Page with from+size or sort+search_after', 'Use source to project fields and keep responses small'), which implies the intended usage pattern. However it never says when to pick this over es_request, nor names prerequisites, so alternative selection is left to inference.

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