Skip to main content
Glama
1franky

Data Platform MCP

by 1franky

execute_mongo_aggregate

Runs a MongoDB aggregation pipeline against a specified collection using a connection ID, validating the pipeline and enforcing find() limits.

Instructions

Execute one validated aggregation pipeline under the same limits as find().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_rowsNo
pipelineYes
collectionYes
connection_idYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
executedYes
documentsNo
operationYesOperation family exposed through MCP and audit.
row_limitNo
truncatedNo
collectionYes
error_codeNo
validationYesComplete result of applying the document read-only operator policy.
duration_msNo
connection_idYes
document_countNo
contract_versionNo1.0.0
serialized_bytesNo
Behavior2/5

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

With no annotations provided, the description carries the full burden. It mentions 'validated' and 'same limits as find()' but does not disclose whether the pipeline may write (e.g., $out/$merge), what 'validated' means, or any error/limit specifics. This is insufficient for a tool with potential side effects.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler. Every word contributes meaning, making it appropriately sized for the tool's scope.

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?

While an output schema exists, preventing the need to explain returns, the description omits critical context for a 5-parameter tool: when to use it, what 'validated' implies, relationship to sibling tools, and potential write behavior. This makes it incomplete for safe invocation.

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 needed to compensate by explaining parameters. It does not mention connection_id, collection, pipeline, max_rows, or timeout_seconds at all. Even though parameter names are somewhat self-explanatory, the description adds no semantic value for their correct usage.

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 'Execute' and the resource 'validated aggregation pipeline', distinguishing it from sibling tools like execute_mongo_find. The reference to 'same limits as find()' further clarifies its scope within the MongoDB tool family.

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 description implies usage for aggregation pipelines and references find() limits, offering some context. However, it does not explicitly state when to prefer this over execute_mongo_find or validate_mongo_query, nor does it mention any exclusions or prerequisites.

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/1franky/data-analits-MCP'

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