Skip to main content
Glama
Snarloff

pg-multi-mcp

by Snarloff

add_connection

Registers a named PostgreSQL or MongoDB connection using a URI, DSN, or environment placeholders, tests it, and saves it to the config file for reuse across queries and schema tools.

Instructions

Adiciona uma conexão nomeada. A 'url' aceita URI (postgresql://... ou mongodb://, mongodb+srv://) ou DSN PostgreSQL (host=... dbname=...) e placeholders ${VAR} resolvidos de variáveis de ambiente — prefira-os a senhas literais. O 'engine' é inferido da URL quando omitido. Por padrão testa a conexão antes de salvar e grava no arquivo de configuração (persist=true).

Input Schema

NameRequiredDescriptionDefault
urlYesURI/DSN da conexão; use ${VAR} para segredos
nameYesNome único (letras, números, '_', '-', '.')
tagsNoTags para busca/agrupamento (ex.: 'producao', 'homologacao')
testNoTesta a conexão antes de manter
engineNoMotor do banco: postgres, mongodb (omitido = inferido da URL)
aliasesNoApelidos usados para encontrar a conexão
persistNoGrava no arquivo de configuração
overwriteNoSubstitui conexão existente com o mesmo nome
access_modeNo'restricted' (somente leitura, padrão) ou 'unrestricted'restricted
descriptionNoDescrição livre (sistema, ambiente, finalidade)

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?

Annotations only declare destructiveHint=false and idempotentHint=false; the description adds real behavioral context: it tests the connection before saving by default and persists to the configuration file. It also notes the placeholder-resolution mechanism, which affects how secrets are handled at runtime. It stops short of describing failure modes (e.g., what happens when the test fails or the name collides).

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?

The purpose is front-loaded in the first sentence, followed by parameter guidance in a logical order (url formats, engine inference, test/persist defaults). It is a single dense paragraph with some clause chaining, but no sentence is 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?

With an output schema present, return values need not be explained, and 100% schema coverage handles most of the ten parameters. The description covers the non-obvious semantics (url forms, engine inference, default test and persist) that an agent must know before calling. Minor gaps: access_mode's 'restricted' default and overwrite semantics are left entirely to the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds genuine meaning beyond the schema: the accepted URI schemes (postgresql://, mongodb://, mongodb+srv://) and DSN form (host=... dbname=...), plus the rule that engine is inferred from the URL when omitted. Those are exactly the ambiguities an agent would otherwise have to guess at.

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 opening sentence "Adiciona uma conexão nomeada" gives a specific verb (add) and resource (named connection), which cleanly separates it from siblings like list_connections, remove_connection, and use_connection. It does not explicitly name the siblings or state the contrast, so it stops 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 Guidelines3/5

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

Usage context is implied by the name and by the note that the connection is saved to the config file, but the description never says when to choose this over use_connection or open_connection, nor what happens if the name already exists beyond the schema's overwrite flag. The one genuine guideline is the preference for ${VAR} placeholders over literal passwords, which is useful but narrow.

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