Skip to main content
Glama
ohankay

mongo-mcp-simple

by ohankay

count_documents

Read-onlyIdempotent

Counts MongoDB documents matching a filter, with optional estimated metadata totals or collation for locale-aware matching.

Instructions

Count documents matching a filter. estimated=true uses collection metadata (fast, ignores the filter). collation: {"locale": "tr", "strength": 2} for Turkish case-insensitive matching (İ=i, I=ı).

Input Schema

NameRequiredDescriptionDefault
filterNo
databaseNo
collationNo
estimatedNo
collectionYes
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond them: estimated=true is fast but silently ignores the filter, and collation changes matching semantics (Turkish İ/i, I/ı). That filter-ignoring caveat is the kind of detail an agent would otherwise get wrong.

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?

Front-loaded with the core action, then two compact clauses for the non-obvious parameters. No filler; the collation clause is terse but carries concrete matching rules an agent can copy.

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

Completeness3/5

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

No output schema, 6 parameters at 0% schema coverage, and the description leaves database/connection semantics and the shape of the count result unstated. Adequate for the count-specific options, but not complete for a tool with this many undocumented inputs.

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 0% across 6 parameters, so the description must compensate and only partly does: it explains estimated and collation meaningfully (with a concrete locale/strength example) and implies filter's role in the first sentence. database, connection, and the required collection string get no semantic explanation at all.

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?

Specific verb+resource: 'Count documents matching a filter' tells the agent exactly what it computes. It does not name a sibling (e.g., find) as the alternative when the actual documents are needed, so it stops short of full differentiation.

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?

The estimated=true clause gives a real decision rule (fast metadata count that ignores the filter), which is a usage condition. But there is no explicit guidance on when to prefer this over find/aggregate for counts, nor any prerequisite context such as required collection or connection setup.

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