Skip to main content
Glama
shibbirweb

mcp-db-read-only

by shibbirweb

Find Documents

find_documents
Read-onlyIdempotent

Retrieve documents from a MongoDB collection using filters, projections, and sort orders. Supports paging and optional database override for read-only queries.

Instructions

Find documents in a MongoDB collection with a filter, optional projection and sort

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skipNoDocuments to skip, for paging
sortNoSort order, e.g. {"createdAt": -1}
limitNoMaximum documents to return (1-100, default 20)
filterNoQuery filter as MongoDB Extended JSON, e.g. {"status": "active", "_id": {"$oid": "..."}}
databaseNoOptional database to read from for this call only, without changing the active connection
collectionYesCollection name
projectionNoFields to include or exclude, e.g. {"name": 1, "_id": 0}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already establish readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is clear and the description does not contradict it. The description adds no behavioral context beyond the schema's filter/projection/sort fields, such as defaults, paging behavior, or output shape, but with strong annotations that gap is acceptable.

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?

One compact sentence front-loads the verb and target resource, then lists the major options. There is no filler or repetition, and the size is appropriate for the tool's simplicity.

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?

With seven parameters fully documented in the schema, the description only needs to orient the agent, and it names the three core query features. It does not state the return shape explicitly, but the absence of an output schema is mitigated by the action literally being 'find documents.'

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% and each parameter already has a clear description and example (filter as Extended JSON, sort/projection syntax, limit/skip paging). The tool description only restates filter/projection/sort without adding new parameter semantics, so it lands at the baseline.

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 action ('Find documents') on a MongoDB collection and names the main query capabilities (filter, projection, sort), so the core purpose is unambiguous. It does not explicitly contrast with sibling aggregation/counting/search tools, but the verb and resource are specific enough to identify the intended operation.

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?

The description says what the tool does but gives no guidance about when to choose find_documents over aggregate, count_documents, distinct_values, or search. There are no use-case conditions, exclusions, or alternative routing, so an agent must infer appropriateness from the name alone.

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