Skip to main content
Glama
shibbirweb

mcp-db-read-only

by shibbirweb

Search Index

search
Read-onlyIdempotent

Query an Elasticsearch or OpenSearch index with a Query DSL body, including counting matches and running aggregations.

Instructions

Search an Elasticsearch or OpenSearch index with a Query DSL body. Use size 0 with track_total_hits true to count, and aggs for aggregations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoSearch body, e.g. {"query": {"match": {"title": "error"}}, "size": 10, "sort": [{"@timestamp": "desc"}]}
indexYesIndex name, pattern such as logs-*, or comma-separated list

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the description doesn't need to repeat those. It adds useful context about how to perform count and aggregation operations via the body parameter, which is beyond the schema. However, it doesn't disclose potential errors (e.g., invalid DSL) or pagination behavior, but with annotations covering safety, a 3 is appropriate.

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 sentences, front-loaded with the purpose, then concise usage tips. Every word earns its place; no fluff.

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?

Given the tool's complexity (query DSL), the schema fully documents parameters, and annotations cover safety. The description adds critical usage patterns for counting and aggregation that an agent might not infer. Output schema is absent, but return format is likely clear from Elasticsearch conventions. It's nearly complete, missing only error-handling notes.

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%, and both parameters have descriptions in the schema. The description adds usage tips for the body parameter (size 0, track_total_hits, aggs), which is valuable but not directly explaining the parameters' semantics beyond what the schema says. So baseline 3 is correct, with a slight addition of context.

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?

Description states the verb 'Search' and the resource 'Elasticsearch or OpenSearch index' clearly, with a focus on Query DSL body. It distinguishes from sibling tools by being the generic search tool, though it doesn't explicitly name alternatives for filtering or aggregations (though it mentions aggs). It's clear but could be more specific about what makes it unique among siblings.

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?

Provides clear guidance on when to use size 0 with track_total_hits for counting and aggs for aggregations, which are specific use cases. However, it doesn't explicitly say when not to use this tool versus siblings like find_documents or aggregate, but the 'use aggs for aggregations' implies that for aggregation-specific tasks you might use aggregate instead, so it's implicit but not fully explicit.

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