Skip to main content
Glama
bunnyiesart

mcp-opensearch

by bunnyiesart

opensearch_terms

Show the top values in a keyword field with their document counts to identify common log data patterns.

Instructions

Frequency table for a keyword field — top N values with their document counts.

If results look wrong or you see a heap warning, append .keyword to the field name (e.g. agent.name.keyword). Never use on analyzed text fields like rule.description — aggregations on text fields load fielddata into cluster heap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoNumber of top values to return (default 50).
fieldYesKeyword field to aggregate, e.g. "agent.name", "rule.id", "data.srcip".
indexYesIndex name or wildcard pattern.
to_tsNoEnd time, UTC ISO 8601.
from_tsNoStart time, UTC ISO 8601.
ts_fieldNoTimestamp field name (default "@timestamp").@timestamp
query_stringNoLucene filter (default "*").*

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Since no annotations are present, the description carries the full burden. It discloses the heap warning and fielddata loading concerns for analyzed fields, but doesn't describe the return format or pagination behavior. Output schema covers return format, making this adequate.

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?

Three sentences, front-loaded with the core purpose, every sentence adds essential information with no redundancy or filler.

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?

Given the output schema exists and parameters are fully described, the description provides all necessary context: purpose, usage rules, and behavioral caveats, making it complete for effective tool use.

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 100% schema coverage, baseline is 3. The description adds value by giving concrete field examples ('agent.name', 'rule.id') and usage advice, enhancing understanding beyond the schema.

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's a 'frequency table for a keyword field' returning 'top N values with their document counts,' which precisely defines the tool's purpose and distinguishes it from siblings like opensearch_multi_terms and opensearch_search.

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

Usage Guidelines5/5

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

Provides explicit when-to-use advice (keyword fields), a concrete fix for common issues ('append .keyword'), and a clear prohibition ('never use on analyzed text fields') with a reason, offering complete guidance for correct invocation.

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