Skip to main content
Glama
ohankay

mongo-mcp-simple

by ohankay

infer_schema

Read-onlyIdempotent

Samples a MongoDB collection to map every field path, its BSON types, and presence percentage, including nested objects and array elements, so you can understand document structure before querying or modeling.

Instructions

Infer the document structure from a random sample: every field path with its BSON types and how often it appears (present_pct). Nested objects use dots, array elements use "[]".

Input Schema

NameRequiredDescriptionDefault
databaseNo
collectionYes
connectionNo
sample_sizeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive operation. The description adds useful behavioral context by stating that results come from a random sample and by explaining the return format, including present_pct and nested path notation.

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 two tight sentences with no wasted language. It is front-loaded with the core action and then specifies the return shape, both of which are useful for the caller.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Annotations cover the safety profile, and the description explains the output shape despite there being no output schema. However, with four parameters and 0% schema description coverage, the description is incomplete regarding parameter meaning and optional connection/database context.

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%, and the description does not explain the four parameters. It only hints at sample_size through the phrase 'random sample'; database, collection, and connection are not described at all, so the description does not compensate for the undocumented 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?

The description uses a specific verb and resource: infer document structure from a random sample. It also defines the returned field paths, BSON types, and present_pct, making the tool distinguishable from generic query tools, though it does not explicitly name sibling alternatives.

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?

Usage is implied by the description of sampling and schema inference, but there is no explicit guidance on when to use this tool versus alternatives such as collection_stats, find, or list_indexes. No exclusions or prerequisites are stated.

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