Skip to main content
Glama
DB MCP Server

DB MCP Server

by HW-public

add_data_source

Connect an additional Oracle, PostgreSQL, or MySQL database at runtime without restarting the server; the new source becomes available to other tools through the dataSource parameter.

Instructions

Connect to an additional database at runtime — no server restart needed. The new source can then be used via the dataSource parameter of all other tools. Note: credentials passed here are visible in session logs; prefer environment variables for permanent sources.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "type": "<type>"
    },
    "name": "add_data_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
dsnNoConnect string, e.g. "dbhost.example.com:1521/ORCLPDB1". Required for oracle (thin mode).
hostNoHost. Required for postgres/mysql.
nameYesUnique name for the new data source, e.g. "mysql-report" or "oracle-erp".
portNoPort. Defaults: 5432 (postgres), 3306 (mysql).
typeYesDatabase type.
userNoUsername. Required.
databaseNoDatabase name (postgres/mysql).
passwordNoPassword. Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses the runtime/no-restart behavior, that the source becomes immediately usable by all other tools, and a security caveat that credentials will appear in session logs. It leaves open whether the source persists beyond the session, whether duplicate names are rejected, and what permissions are required to add one.

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?

Three short sentences with zero filler: capability first, downstream effect second, security caveat last. Every sentence contributes a fact an agent would otherwise have to guess.

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 an eight-parameter mutation tool with no annotations and no output schema, the description covers the operation's effect, its consequence for other tools, and the credential-handling risk. The remaining gaps — idempotency/duplicate-name behavior, session lifetime, and required privileges — are meaningful but secondary for a connect-style tool, so it is nearly but not fully complete.

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 parameter-level baseline is 3; the description earns an extra point by explaining the downstream meaning of the `name` parameter — that the value becomes the dataSource identifier consumed by other tools, linking this call to later invocations. It adds no clarification of the connection fields (dsn/host/port), which the schema already handles.

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 gives a specific verb and resource ("Connect to an additional database at runtime") and makes the effect concrete: the new source becomes available through the dataSource parameter of every other tool, which distinguishes it from query/listing siblings. It stops short of naming a sibling or explicitly contrasting with list_data_sources, so it is clear but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It states the situation for use (adding a source at runtime without a restart) and gives an explicit alternative path ("prefer environment variables for permanent sources"), which is essentially a when-not-to-use signal. It does not say what to do if the source already exists or whether to verify with list_data_sources first, so it is a bit short of a full routing rule.

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