Skip to main content
Glama
mongo-readonly-mcp

mongo-readonly-mcp

by tboon0

mongo_distinct

Read-only

Retrieve unique values for a specified field in a MongoDB collection using a named connection profile, with optional query filtering to narrow results.

Instructions

Read distinct field values in a profile's collection.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "profile": "<profile>",
      "collection": "<collection>",
      "field": "<field>"
    },
    "name": "mongo_distinct"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldYes
queryNo
profileYes
collectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare read-only, open-world, and non-destructive behavior, so the safety profile is covered. The description adds the collection/profile scope and that values are distinct, but it omits how query filtering affects results, error behavior, and result shape.

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 definition is a single front-loaded sentence with no filler or redundancy. Every word contributes to stating the operation and scope.

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?

For a simple read operation, the purpose and annotations are enough to attempt a basic call with the required parameters. However, with no output schema and zero schema description coverage, the description should explain the optional query parameter and at least imply the return shape, both of which are missing.

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%, so the description must compensate for all four parameters. It partially explains profile, collection, and field by tying them to distinct values, but it completely omits the optional query parameter and gives no detail on field path syntax or query filter semantics.

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 states a specific verb, 'Read', and a specific resource/operation, 'distinct field values', scoped to 'a profile's collection'. It clearly distinguishes the tool's output from document-returning siblings like mongo_find, though it does not name 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: an agent can infer this tool is for retrieving unique values of a field. However, the description gives no explicit when-to-use guidance versus mongo_find, mongo_aggregate, or mongo_count, and does not explain when the optional query parameter should be used.

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