Skip to main content
Glama
bunnyiesart

mcp-opensearch

by bunnyiesart

opensearch_multi_terms

Aggregate multiple keyword fields in OpenSearch with a single request, reducing round trips. Supports time range and query filters.

Instructions

Preferred over calling opensearch_terms in a loop — single round-trip for multiple fields.

Inherits the .keyword guidance from opensearch_terms: append .keyword to any text-like field name to avoid fielddata heap pressure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesIndex name or wildcard pattern.
to_tsNoEnd time, UTC ISO 8601.
from_tsNoStart time, UTC ISO 8601.
ts_fieldNoTimestamp field name (default "@timestamp").@timestamp
aggregationsYesList of aggregation specs, each a dict with: - id (str): Label for this aggregation in the result. - field (str): Keyword field to aggregate. - size (int, optional): Top N values (default 50). Example: [{"id": "agents", "field": "agent.name", "size": 20}, {"id": "rules", "field": "rule.id", "size": 10}, {"id": "sources", "field": "data.srcip", "size": 30}]
query_stringNoLucene filter (default "*").*

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Description mentions single round-trip and fielddata heap avoidance, but with no annotations, more behavioral details (limits, errors) would be helpful.

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 focused sentences, no fluff, front-loaded with key benefit.

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?

Output schema covers return values. Description covers usage context and a gotcha. Lacks error/permission info but adequate for a simple aggregation tool.

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?

Schema coverage is 100%, so the schema does the heavy lifting. Description adds .keyword context but little extra semantic meaning.

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 it performs multi-field terms aggregation in a single round-trip, distinguishing it from looping opensearch_terms.

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?

Explicitly recommends over looping opensearch_terms and provides .keyword guidance, but lacks explicit when-not-to-use scenarios.

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/bunnyiesart/mcp-opensearch'

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