Skip to main content
Glama
ohankay

mongo-mcp-simple

by ohankay

aggregate

Read-onlyIdempotent

Runs a JSON-stage MongoDB pipeline to filter, group, and transform collection data, returning capped results with collation and optional $out/$merge writes.

Instructions

Run an aggregation pipeline (JSON array of stages). $out / $merge are allowed unless the profile is read-only. limit caps the returned documents (default the profile's max_docs). collation: {"locale": "tr", "strength": 2} for Turkish case-insensitive matching (İ=i, I=ı).

Input Schema

NameRequiredDescriptionDefault
limitNo
databaseNo
pipelineYes
collationNo
collectionYes
connectionNo
max_time_msNo
allow_disk_useNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3/5.0
Behavior2/5

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

The description does add real value beyond annotations by disclosing write-capable stages ($out/$merge) that persist results, contradicting readOnlyHint=true and destructiveHint=false. It also explains that limit defaults to the profile's max_docs, which is genuine behavioral context. But the core safety claim conflicts with the declared annotations, leaving an agent unsure whether this call can mutate data.

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?

Three short sentences, front-loaded with the action and followed by the two constraints an agent most needs. Dense and free of filler, though the collation example is slightly detailed relative to the omitted parameters.

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?

For an 8-parameter tool with no output schema and no param descriptions, the description covers the highest-risk items (write stages, limit default, collation) but leaves half the surface undocumented and never states what the result looks like or how errors surface. Adequate but visibly partial.

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 carries the full burden, yet it explains only pipeline, limit, and collation (with a useful Turkish-locale example). Five parameters — database, collection, connection, max_time_ms, allow_disk_use — get no explanation at all, and max_time_ms/allow_disk_use are non-obvious enough to need one.

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?

States a specific verb and resource: 'Run an aggregation pipeline (JSON array of stages)'. That is clearly distinguishable from siblings like find, count_documents, and distinct. It does not explicitly say how it differs from run_command, which could also execute arbitrary server-side logic, so it stops short of a 5.

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?

Usage is only implied by the mechanism (pipeline = aggregation), with a conditional note that $out/$merge are allowed unless the profile is read-only. There is no explicit when-to-use-this-vs-find/run_command guidance and no statement of prerequisites or failure modes. Enough to orient, not enough to route confidently.

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