Skip to main content
Glama

count

Count documents matching a DSL query in an OpenSearch index. Specify the index and optional query clause to get the total count of matching records.

Instructions

Count documents matching a DSL query clause (default match_all).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoarkime_sessions3-*
query_dslNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/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 states the basic behavior (count documents with a query) but omits details like whether the count is approximate, if there are limits, performance implications, or how empty query_dsl is handled. This is insufficient for a tool that executes a query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, highly concise and front-loaded with the key action. However, it omits essential parameter context, so it sacrifices completeness for brevity.

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

Completeness2/5

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

Given the tool has two parameters (both undocumented in schema) and sibling tools, the description does not provide enough context. It does not explain the index parameter, how to construct DSL queries, or compare to similar tools. The output schema exists but does not compensate for missing parameter info.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions 'DSL query clause' for the query_dsl parameter but does not explain the format or the index parameter at all. The description adds minimal value beyond the schema defaults.

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 the verb 'count' and resource 'documents', explicitly mentioning the filtering mechanism 'DSL query clause' with a default 'match_all'. This distinguishes it from sibling tools like 'search_dsl' (which returns documents) and 'arkime_unique' (which counts unique values).

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?

No explicit guidance on when to use this tool versus alternatives. The description implies it is for counting documents, but does not mention exclusions or scenarios where other tools like 'search_dsl' or 'arkime_unique' would be more appropriate.

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/nagameTW/mcp-server-malcolm'

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