Skip to main content
Glama
bpamiri

elasticsearch-mcp

by bpamiri

date_histogram

Aggregate document counts over time using a date field. Specify index, date field, and interval to get time buckets with counts.

Instructions

Get document counts over time (date histogram).

Args: index: Index to aggregate. field: Date field to aggregate on (e.g., "@timestamp"). interval: Time interval (minute, hour, day, week, month, year). query: Optional query to filter documents.

Returns: Time buckets with document counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
fieldYes
intervalNoday
queryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral aspects. It only states the basic return format ('Time buckets with document counts') but does not mention potential performance impacts, required permissions, or limits on bucket counts, which are critical for an aggregation tool.

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 concise with a clear summary line followed by structured Args and Returns sections. Every sentence adds information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the purpose and parameters adequately, and an output schema exists for return details. However, it lacks usage guidelines and behavioral context (e.g., performance considerations), making it minimally complete for a moderately complex aggregation tool.

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?

With 0% schema description coverage, the description adds value by explaining each parameter: 'index' (Index to aggregate), 'field' (Date field, e.g., '@timestamp'), 'interval' (minute, hour, day, week, month, year), and 'query' (Optional filter). This clarifies usage beyond parameter names.

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 'Get document counts over time (date histogram)', which specifies the verb 'get' and the resource 'document counts' with a time-based aggregation. This distinguishes it from sibling tools like terms_aggregation (which aggregates by terms) and count_docs (total count).

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 does not explicitly state when to use this tool versus alternatives like terms_aggregation or search. It only describes what it does, leaving usage context implied by the name and parameter descriptions.

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

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