Skip to main content
Glama
kibana-console-mcp

kibana-console-mcp

by fff-fm-404

Count documents

es_count

Count documents matching a query in a specified index. Get the total count directly without retrieving search results, reducing resource usage.

Instructions

Count documents matching a query. Cheaper than a search when only the total matters.

Input Schema

NameRequiredDescriptionDefault
indexYesIndex or pattern
queryNoQuery DSL "query" clause

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses a useful behavioral trait: this tool is cheaper than a search. However, it does not explicitly state that the operation is read-only, non-mutating, or what the response format is. For a simple count operation this is modest but not fully complete.

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 a single sentence that earns its place: it states what the tool does and when to use it. No wasted words and the key advantage is front-loaded.

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?

For a simple two-parameter count tool, the description plus schema covers the purpose, the query semantics, and the main usage condition. It does not explicitly state that the return value is a count, but that is strongly implied by the name, title, and described behavior. The absence of an output schema is not a serious gap here.

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 description coverage is 100%, so both parameters (index and query) are already documented in the schema. The description only reinforces the role of the query clause ('matching a query') without adding new detail. Baseline 3 is appropriate when the schema handles parameter documentation.

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 a specific action ('Count documents matching a query') and the resource. It also distinguishes itself from sibling tools like es_search by noting it is 'cheaper than a search' when only the total matters, so an agent can tell it apart without opening schemas.

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 explicitly says when to prefer this tool: 'Cheaper than a search when only the total matters.' This gives a clear condition for choosing it over a full search. It could be more explicit by naming alternatives like es_search, but the guidance is still clear and actionable.

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