Skip to main content
Glama
sourabhshegane

MongoDB That Works - MCP Server

getSchema

Read-onlyIdempotent

Analyze a MongoDB collection's structure to return field names with their data types.

Instructions

Analyze collection structure and return field names with types

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesCollection name
sampleSizeNoNumber of documents to sample

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.3

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is fully covered. The description adds that it returns field names with types, which is part of its behavior, but doesn't disclose that it samples documents (implied by sampleSize param) or that results are approximate. No contradiction, but no additional behavioral context beyond the purpose.

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, compact sentence that front-loads the main action ('Analyze collection structure') and the outcome ('return field names with types'). No redundant words, and it is immediately scannable by an agent.

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

Completeness4/5

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

For a simple read-only analysis tool with two well-documented parameters, the description is sufficient. It states the return content (field names with types) and the tool's purpose. It could mention that results are based on sampling (given the sampleSize parameter), but that is inferable. No output schema exists, so the description covers the essential return information.

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?

The input schema has 100% coverage: both 'collection' and 'sampleSize' have descriptive text. The description does not add any parameter-specific details beyond what the schema provides. Since the schema already documents the parameters adequately, the baseline of 3 is appropriate.

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's purpose: analyze collection structure and return field names with types. This distinguishes it from siblings like find (returns documents), aggregate (returns computed results), and listCollections (lists collections). The verb 'analyze' is specific and the resource 'collection structure' is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for schema introspection rather than data retrieval. While it doesn't explicitly name alternatives or state when not to use it, the contrast with sibling tools is clear enough for an agent to select it appropriately. A mention of 'use this instead of find when you need structure' would make it a 5.

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

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/sourabhshegane/mongodb-mcp-that-works'

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