Skip to main content
Glama
chzkyy

mcp-mongodb

by chzkyy

get_by_id

Read-only

Ambil satu dokumen berdasarkan _id. String hex 24 karakter otomatis dikonversi menjadi ObjectId.

Instructions

Ambil satu dokumen berdasarkan _id. String hex 24 karakter otomatis dikonversi menjadi ObjectId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesNilai _id dokumen. Contoh: "665f1c9e2f8b3a0012ab34cd".
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
Behavior4/5

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

The annotation declares readOnlyHint=true, so the safety profile is covered. The description adds meaningful behavioral detail by disclosing that 24-character hex strings are automatically converted to ObjectId, which is a non-obvious behavior an agent needs to know.

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?

Two tight sentences deliver the core purpose and the critical conversion behavior without wasted words. The most decision-relevant information is front-loaded.

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-by-id tool with readOnlyHint and a fully described schema, the description is nearly complete. The main gap is that it does not state what happens when no document matches, such as returning null, an empty result, or an error.

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 structured documentation already explains all parameters. The description adds only the ObjectId conversion nuance for the id parameter; it does not meaningfully elaborate on collection or database semantics beyond the schema.

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 clearly states that the tool retrieves one document by its _id, and the auto-conversion detail sharpens the scope. However, it does not explicitly differentiate get_by_id from find_one, which could also be used for _id-based lookups.

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?

No guidance is provided on when to use this tool versus alternatives such as find_one or find. The description explains a conversion behavior but gives no context about exclusions, fallback recommendations, or scenarios where another tool would be more appropriate.

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