Skip to main content
Glama
ohankay

mongo-mcp-simple

by ohankay

add_connection

Register or replace a MongoDB connection profile at runtime, test it, and optionally make it the default for secure multi-connection access without mongosh or PowerShell.

Instructions

Register (or replace) a connection profile at runtime and test it.

host: "srv01", "srv01:27017" or "h1:27017,h2:27017"; or uri: "mongodb://..." / "mongodb+srv://...". auth: none | scram (user+password) | ldap | windows (Kerberos with the Windows logon) | x509 | uri. Passwords are never passed here: use password_env (name of an environment variable set in mcp.json).

Input Schema

NameRequiredDescriptionDefault
tlsNo
uriNo
authNo
hostNo
nameYes
userNo
databaseNo
readonlyNo
auth_sourceNo
replica_setNo
make_defaultNo
password_envNo
direct_connectionNo
tls_allow_invalid_certificatesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations declare a non-readonly, non-destructive, non-idempotent write, and the description adds real context beyond them: the profile is registered at runtime, replaces an existing entry, and is tested as part of the call. The security-relevant rule 'Passwords are never passed here: use password_env (name of an environment variable set in mcp.json)' is exactly the kind of credential handshake an agent needs and no annotation supplies it. It still doesn't say what happens when the test fails or whether the profile persists across restarts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact lines: purpose first, then host/uri syntax, then auth modes and the credential rule. Grouped by parameter family and free of filler, though it spends its budget on the already-obvious connection fields while omitting higher-impact ones.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter mutation tool with no output schema and zero schema descriptions, the description covers only the happy path of naming a host and an auth mode. An agent cannot confidently set make_default, readonly, tls, replica_set or direct_connection from this definition, and the return value of the 'test it' step is unspecified.

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 coverage is 0% across 14 parameters, so the description carries the full burden. It explains only host, uri, auth and password_env (with useful format examples and an enumerated auth mode list), leaving tls, user, database, readonly, auth_source, replica_set, make_default, direct_connection and tls_allow_invalid_certificates completely undocumented — several of which materially change behavior (make_default, readonly).

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 concrete verb and resource — 'Register (or replace) a connection profile at runtime and test it' — which an agent can clearly separate from list_connections, test_connection and remove_connection. It only lacks an explicit contrast with the siblings it overlaps with (test_connection in particular).

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?

The 'at runtime' framing implies this is for adding a profile mid-session rather than the initial config, but no when-to-use / when-not-to-use guidance is given. The overlap with test_connection (which presumably tests an already-registered profile) and with remove_connection is left for the agent to infer.

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