Skip to main content
Glama
baburajr

elasticsearch-mcp

by baburajr

paged_search

Read-only

Retrieve paginated search results past the 10,000-document limit using point-in-time and search_after. Use the returned pit_id and next_search_after to fetch the following page.

Instructions

Page through a large result set beyond the 10000 deep-paging limit using a point-in-time and search_after. First call: open_pit, then call this with the pit_id and a query; it returns one page plus next_search_after and the (possibly refreshed) pit_id. Pass both back on the next call to get the following page. A sort is required and an implicit _shard_doc tiebreak is added for stable ordering. No index argument: the PIT already binds the index. Close with close_pit at the end.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
sortNo
queryNo
pit_idYes
keep_aliveNo1m
search_afterNo
source_includesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses important non-obvious behaviors beyond the annotations: a sort is required, an implicit _shard_doc tiebreak is added, the PIT binds the index so no index argument is needed, and the returned pit_id may be refreshed. This is exactly the behavioral context an agent needs to use the tool safely and correctly.

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 dense but not bloated: purpose, workflow, ordering constraint, PIT binding, and closing requirement are each covered in a few direct sentences. There is no filler, and the most important stateful protocol is front-loaded.

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?

For a stateful PIT-based pagination tool, the description covers the full lifecycle: open, call, continuation, and close. It also explains response behavior (page plus next_search_after and refreshed pit_id) and the sort/stability requirement. Output schema and annotations cover the remaining structural safety information, so nothing essential is missing for a correct call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate heavily. It does explain pit_id, query, and search_after via next_search_after, and notes that sort is required. However, size, keep_alive, and source_includes receive no semantic explanation in either the schema or the description, leaving gaps for a 7-parameter tool.

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 and resource: 'Page through a large result set beyond the 10000 deep-paging limit using a point-in-time and search_after.' This clearly distinguishes the tool from ordinary query tools and from its open_pit/close_pit siblings. It names the exact mechanism and scope without tautology.

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 gives a clear sequential protocol: first call open_pit, then call paged_search with the pit_id and query, pass next_search_after and refreshed pit_id back, and finally close with close_pit. This is strong contextual guidance. It does not explicitly mention when not to use this tool versus alternatives like run_query, so it stops short of a 5.

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/baburajr/elasticsearch_mcp'

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