Skip to main content
Glama
chzkyy

mcp-mongodb

by chzkyy

distinct

Read-only

Ambil daftar nilai unik dari sebuah field (opsional dengan filter).

Instructions

Ambil daftar nilai unik dari sebuah field (opsional dengan filter).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldYesNama field yang ingin diambil nilai uniknya.
filterNoQuery filter MongoDB. Contoh: {"status": "aktif", "umur": {"$gt": 25}}. Kirim sebagai objek atau string JSON. Gunakan {} untuk semua dokumen.
databaseNoNama database tujuan. Opsional jika MONGODB_DB sudah diatur.
collectionYesNama koleksi.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

The annotation readOnlyHint=true already covers the safety profile, and the description reinforces it with 'Ambil'. It adds useful behavioral context by clarifying that the operation is scoped to one field and may apply a filter. However, it does not disclose output format, limits, or behavior when no matching values exist.

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, front-loaded sentence with no filler. It communicates the operation, the target field, and the optional filter in minimal space. Every word contributes to understanding.

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 distinct-values tool, the description plus the fully documented schema is sufficient to invoke it correctly. The word 'daftar' already indicates the return is a list, and the schema covers parameter meanings. It lacks deeper output details, but the tool's low complexity makes that a minor gap.

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%, so the input schema already documents all four parameters. The description only restates field and filter behavior without adding new detail about filter syntax, database fallback, or collection semantics. Baseline 3 is appropriate because the schema carries the parameter meaning.

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?

Description clearly states a specific operation: retrieve the list of unique values from a field, with an optional filter. The verb 'Ambil' and resource 'field' make the tool's purpose unambiguous, and the focus on unique values distinguishes it from siblings like find or count. It does not explicitly name a sibling, so it stops just short of a 5.

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 implies the tool is for distinct-value retrieval and notes that filtering is optional, but it gives no concrete guidance about when to choose this tool over find, aggregate, or count. No alternative tools, exclusions, or prerequisites are mentioned.

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