Skip to main content
Glama
chzkyy

mcp-mongodb

by chzkyy

count

Read-only

Menghitung jumlah dokumen yang cocok dengan filter.

Instructions

Menghitung jumlah dokumen yang cocok dengan filter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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

A3.6/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes the read-only safety profile. The description adds a useful scoping detail: the count applies only to documents matching the filter, not the whole collection. It does not, however, mention the return format (e.g., a numeric total), behavior on empty collections, or error cases; with the annotation covering safety, this is an average but acceptable disclosure.

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?

A single, front-loaded sentence states the operation and the object of the operation with zero filler. Every word earns its place in the description.

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 count operation, the description plus fully documented schema (filter, database, collection) and readOnlyHint annotation are nearly complete. The only meaningful gap is the absence of an explicit return-type statement or output schema, but 'menghitung jumlah' already conveys that the result is a count.

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 covers 100% of parameters with meaningful descriptions, including a MongoDB filter example and the use of {} for all documents. The description itself adds no parameter detail, so the schema carries the burden and the score stays at the baseline.

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 'Menghitung jumlah dokumen yang cocok dengan filter' names a specific verb (menghitung/count), a distinct resource (documents matching a filter), and clearly differentiates from sibling tools like find, distinct, and aggregate, whose purpose is to return or transform documents rather than just count them.

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?

There is no guidance on when to use count versus siblings such as find, distinct, or aggregate, and no exclusions or alternative conditions. The purpose statement implies counting is the intended use, but the description never says 'use this when you only need a count' or mentions any alternative.

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