Skip to main content
Glama
fb0sh
by fb0sh

mongo_aggregate

Run MongoDB aggregation pipelines to transform and analyze collection data; read-only connections reject $out and $merge stages.

Instructions

Run a MongoDB aggregation pipeline. Read-only connections reject $out/$merge.

Input Schema

NameRequiredDescriptionDefault
limitNo
databaseNo
pipelineYes
collectionYes
connection_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does add one genuinely useful behavioral fact (read-only connections reject write stages $out/$merge), but says nothing about result-size handling, cursors, the purpose of the limit parameter, or permissions.

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?

Two short sentences, front-loaded with the core action followed by the constraint. Nothing is wasted, though the terseness borders on under-specification rather than efficient density.

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?

No annotations, no output schema, and zero parameter documentation, yet the description covers only the action and one $out/$merge caveat. For a five-parameter tool with an untyped pipeline, an agent still lacks what connection_id expects, how limit interacts with results, and what a call returns.

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% across five parameters, including an untyped 'pipeline' object and an unconstrained 'limit'. The description mentions none of them (connection_id, database, collection, pipeline, limit), so it does not compensate for the coverage gap; only the word 'pipeline' is implicitly explained.

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 a MongoDB aggregation pipeline. It is distinguishable from mongo_find in practice (aggregation vs. query), but the description never names the sibling or contrasts the two.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to choose aggregation over mongo_find, no prerequisites, and no note on which connection types are usable. The only usage-adjacent hint is that read-only connections reject $out/$merge, which is a constraint rather than a routing rule.

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