Skip to main content
Glama
db-conn-mcp

db-conn-mcp

doctor

Read-onlyIdempotent

Diagnose database MCP setup issues that connectivity checks miss, including stale processes, config typos, exposed secrets, and dead client paths. Returns actionable findings with fixes.

Instructions

Diagnose the whole setup, not just connectivity — use when something is misbehaving and check_database alone doesn't explain why.

Runs every diagnostic: stale running server processes, newer PyPI release, connections.json key typos/types, secrets exposure (permissions, git), MCP client entries pointing at dead paths, and per-database connectivity with a credential-free fallback-port identity probe.

Returns meta and findings, each with check, status (ok|warn|fail|skipped), detail and suggested_action, where suggested_action is machine-actionable: reconnect_client, upgrade_package, swap_primary_port, fix_permissions, fix_config, repair_client_config, fix_connection, install_doctor_extra, run_setup, report_bug, or none — every finding that states a remedy names one. Fix what you can; report the rest to the user verbatim. Output is sanitized — never contains DSNs, hosts, or credentials. offline=true skips the PyPI lookup.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "doctor"
  }
}

Input Schema

NameRequiredDescriptionDefault
offlineNoSkip the online check for a newer release on PyPI.

Output Schema

NameRequiredDescriptionDefault
metaYes
findingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.1
    • addedInput schema / properties / offline / description
      Added value: +"Skip the online check for a newer release on PyPI."
  2. Changed6 schema fields changedv0.8.0
    • addedOutput schema / $defs
      Added value: +{
      +  "Meta": {
      +    "description": "The first key of every tool's answer: what came back, and how long it took.\n\nnull means the field does not apply to the tool, or the tool cannot know it.",
      +    "properties": {
      +      "database": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Database"
      +      },
      +      "elapsed_ms": {
      +        "title": "Elapsed Ms",
      +        "type": "integer"
      +      },
      +      "row_count": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Row Count"
      +      },
      +      "tool": {
      +        "title": "Tool",
      +        "type": "string"
      +      },
      +      "truncated": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Truncated"
      +      }
      +    },
      +    "required": [
      +      "tool",
      +      "database",
      +      "row_count",
      +      "truncated",
      +      "elapsed_ms"
      +    ],
      +    "title": "Meta",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / findings
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "title": "Findings",
      +  "type": "array"
      +}
    • addedOutput schema / properties / meta
      Added value: +{
      +  "$ref": "#/$defs/Meta"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "items": {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  "title": "Result",
      -  "type": "array"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "meta",
      +  "findings"
      +]
    • changedOutput schema / title
      Previous value: -"doctorOutput"New value: +"DoctorResult"
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context on top: the exact checks performed, the output shape, a machine-actionable suggested_action vocabulary, a sanitization guarantee ('never contains DSNs, hosts, or credentials'), and a credential-free fallback-port identity probe. That is behavior an agent could not infer from the annotations.

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?

Front-loaded with the purpose and the routing condition, then the check list, then the output contract — good ordering. The 11-value suggested_action enumeration is long and partly duplicates the output schema, which is the only real fat.

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

Completeness5/5

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

Despite an output schema existing, the description still tells the agent how to act on results (remedy names, report verbatim), and it covers the trust model (sanitized output) and the one flag. Nothing needed to call or interpret this tool correctly is missing.

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% and the single parameter is already documented as skipping the PyPI lookup; the description's 'offline=true skips the PyPI lookup' restates rather than extends it. Baseline 3 applies when the schema does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and scope ('Diagnose the whole setup, not just connectivity') and immediately enumerates the six check families it runs. An agent can distinguish it from check_database without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('use when something is misbehaving and check_database alone doesn't explain why'), naming the sibling to escalate from and the condition that selects it. It also closes the loop with post-call guidance ('Fix what you can; report the rest to the user verbatim').

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