Skip to main content
Glama
Sanjeev4523

MongoDB MCP Server

by Sanjeev4523

run_aggregation

Run custom aggregation pipelines on MongoDB collections to transform and analyze data. Use stages to filter, group, and sort documents for complex queries.

Instructions

Run an aggregation pipeline on a collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYesThe database name
pipelineYesThe aggregation pipeline stages
collectionYesThe collection name
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 of disclosing behavioral traits. It only states the action and does not mention potential side effects (e.g., if the pipeline uses $out or $merge), return format, permissions, or any limitations. This is a significant transparency gap.

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 with no redundant words, making it concise and front-loaded. However, it is quite terse and lacks the detail that would make it fully helpful, but that is more a completeness issue rather than a conciseness issue.

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?

For a tool with three required parameters, no output schema, and no annotations, the description is incomplete. It does not explain the behavior of the pipeline, the return structure, or how it differs from the sibling run_aggregation_to_file. The description is too minimal to fully support an agent in selecting and invoking the tool correctly.

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%, with each parameter (database, collection, pipeline) having a description in the schema. The tool description adds no additional parameter semantics, so the baseline of 3 is appropriate.

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?

The description uses a specific verb 'Run' and identifies a clear resource: 'an aggregation pipeline on a collection'. It clearly states the core action, but it does not differentiate from the sibling tool run_aggregation_to_file, which also runs an aggregation pipeline (with a different output destination).

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?

The description provides no guidance on when to use this tool versus alternatives. Given the sibling run_aggregation_to_file, users are left without any information on which tool to choose based on their needs (e.g., in-memory results vs. file output).

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/Sanjeev4523/mongo-mcp'

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