Skip to main content
Glama
fb0sh
by fb0sh

mongo_describe_collection

Inspect a MongoDB collection by sampling a document in EJSON, listing indexes, and inferring field types to understand structure before querying or writing data.

Instructions

Describe a MongoDB collection: sample document (EJSON), indexes and inferred fields.

Input Schema

NameRequiredDescriptionDefault
databaseNo
collectionYes
connection_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/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, and it does disclose the return shape (sample doc, indexes, inferred fields) — useful signal. It does not state that the operation is read-only, how large the sample is, whether inference can be slow on large collections, or whether it errors on missing collections.

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?

A single front-loaded sentence with no filler; the payload items are listed compactly after the colon. Nothing to cut.

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 three-parameter tool with zero schema descriptions, no annotations, and no output schema, the description is too thin: the optional 'database' semantics and the fact that this is a safe read are unaddressed. The one sentence covers the what but not the how.

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 three parameters (connection_id, collection, database), and the description compensates for none of them. Notably it never explains that 'database' is optional or what happens when it is omitted, which is the single most ambiguous part of the schema.

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+resource ('Describe a MongoDB collection') and enumerates exactly what is returned: a sample document in EJSON, indexes, and inferred fields. This clearly differentiates it from mongo_find/mongo_aggregate, though it never names those siblings explicitly.

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 word 'describe' plus the inventory of returned artifacts implies an inspection/schema-discovery use case, so the agent can infer this is what you call before writing a query. However, there is no explicit 'use this when… use mongo_find instead when…' guidance and no prerequisites (e.g., connection must be open).

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