Skip to main content
Glama
Snarloff

pg-multi-mcp

by Snarloff

execute_mongo

Destructive

Runs MongoDB find, aggregate, count, insert, update, or delete operations on a selected connection, respecting read-only restrictions and result limits.

Instructions

Run a MongoDB operation on the chosen connection. 'restricted' connections only accept reads (find, aggregate without $out/$merge, count, distinct, read-only commands; no server-side JavaScript; timeout); 'unrestricted' connections also accept insert/update/replace/delete.

Input Schema

NameRequiredDescriptionDefault
skipNoDocumentos a pular (find)
sortNoOrdenação do find, ex.: {"created_at": -1}
fieldNoCampo do distinct
limitNoLimite do find (0 = até max_rows)
filterNoFiltro de consulta (find, count, distinct, update_*, replace_one, delete_*). Aceita Extended JSON, ex.: {"_id": {"$oid": "..."}}
updateNoUpdate (ex.: {"$set": {...}}) ou pipeline de update; em replace_one, o documento substituto
upsertNoUpsert em update_* / replace_one
commandNoComando de banco para operation='command', ex.: {'dbStats': 1}. Em 'restricted' só comandos de leitura.
explainNoRetorna o plano de execução (queryPlanner) em vez dos documentos (find/aggregate)
databaseNoBanco; omitido = banco definido na URL da conexão
max_rowsNoMáximo de documentos retornados (o excedente é truncado no servidor)
pipelineNoPipeline do aggregate
documentsNoDocumentos para insert_one (um) / insert_many
operationYesfind | aggregate | count | distinct | command (leitura); insert_one | insert_many | update_one | update_many | replace_one | delete_one | delete_many (só em conexões 'unrestricted')
collectionNoCollection alvo (não usado em 'command')
connectionNoNome ou alias da conexão (veja list_connections). Se omitido, usa a conexão ativa ou a padrão.
projectionNoProjeção do find, ex.: {"name": 1, "_id": 0}

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the destructiveHint annotation, the description discloses the key behavioral rule: restricted connections permit only reads, reject server-side JavaScript, and enforce a timeout, while unrestricted connections allow writes. It still does not mention truncation behavior, pagination, or result format, but annotations and the output schema cover part of that.

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 sentences, front-loaded with the core action, followed immediately by the security constraint that governs which operations are valid. Every clause carries decision-relevant information with no filler.

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?

Given the rich schema, existing output schema, and destructiveHint annotation, the description covers the most important missing context: which connections allow writes and which operations are read-only. It is nearly complete, though it could say more about result truncation and the destructive nature of write operations beyond what annotations imply.

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 coverage is 100%, so all 17 parameters are already documented with examples and operational notes in the schema. The description adds contextual meaning to the operation parameter via the restricted/unrestricted constraint but does not otherwise elaborate on parameters. Baseline 3 is appropriate when the schema does the heavy lifting.

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 specific verb and resource: 'Run a MongoDB operation on the chosen connection.' That clearly separates it from the SQL sibling execute_sql without naming it. The operation list itself is delegated to the schema rather than enumerated here, which keeps it from being 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes an important usage constraint through the restricted vs unrestricted connection model. However, it never explicitly contrasts this tool with execute_sql or explain_query, nor does it state when to prefer a dedicated sibling. Usage is implied rather than directed.

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