Skip to main content
Glama

query

Query MongoDB collections with filters, projections, and limit options. Optionally analyze execution plan statistics for query optimization.

Instructions

Execute a MongoDB query with optional execution plan analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of documents to return
filterNoMongoDB query filter
explainNoOptional: Get query execution information
collectionYesName of the collection to query
projectionNoFields to include/exclude
objectIdModeNoControl how 24-character hex strings are handledauto
Behavior2/5

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

With no annotations provided, the description must disclose behaviors. It only states execution of a query, but does not specify if this is read-only, side effects, permission needs, or performance implications.

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?

Single sentence that is direct and front-loaded with the core action. No unnecessary words, and the optional analysis is mentioned immediately.

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?

Despite having 6 parameters and no output schema, the description does not explain return values, pagination, or behavior for required parameters. It is too minimal for a complex MongoDB query operation.

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%, so each parameter is already documented. The description adds minor value by linking 'execution plan analysis' to the explain parameter, but does not provide additional semantic context.

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 tool executes a MongoDB query with optional execution plan analysis. The verb 'Execute' and resource 'MongoDB query' are specific, and the mention of execution plan analysis distinguishes it from basic query tools.

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 use this tool versus siblings like aggregate or count. The description does not mention appropriate scenarios, prerequisites, or exclusions.

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

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