Skip to main content
Glama
db-conn-mcp

db-conn-mcp

check_database

Read-onlyIdempotent

Tests connectivity to one or all configured databases and reports OK or a sanitized failure cause so you can diagnose connection errors or verify tunneled connections.

Instructions

Test connectivity for one database (or all) — returns OK or a sanitized cause.

Opens a read-only connection and closes it again; it changes nothing. Use it when a call fails with a connection error, or after starting a tunnel. When it says UNREACHABLE and the reason is unclear, run doctor for a full setup diagnosis.

Returns meta and results, one item per database with database and status (OK or UNREACHABLE; an unreachable one adds category and detail). meta.database is null when every database was checked. Reports active_port when the database answered on a fallback port — doubles as a live re-probe for tunneled connections.

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": "check_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoName of one configured database, as list_databases returns it. Omit to check every configured database.

Output Schema

NameRequiredDescriptionDefault
metaYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.1
    • addedInput schema / properties / database / description
      Added value: +"Name of one configured database, as list_databases returns it. Omit to check every configured database."
  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 / meta
      Added value: +{
      +  "$ref": "#/$defs/Meta"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "items": {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  "title": "Result",
      -  "type": "array"
      -}
    • addedOutput schema / properties / results
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "title": "Results",
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "meta",
      +  "results"
      +]
    • changedOutput schema / title
      Previous value: -"check_databaseOutput"New value: +"CheckDatabaseResult"
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds real behavior: it opens and closes a read-only connection, changes nothing, sanitizes the failure cause, and reports active_port on a fallback port — doubling as a live re-probe for tunneled connections. That is context an agent cannot derive 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 purpose, then usage, then return shape — a sensible priority order with no filler sentences. It is slightly longer than necessary because the return-shape paragraph partly duplicates the existing output schema.

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?

Covers purpose, triggers, escalation path, safety profile, and what status values mean — ample for a one-parameter diagnostic tool with annotations and an output schema. The only excess is restating return structure that the output schema already defines.

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 is 3. The description adds value by clarifying the omit case ('one database (or all)') and its consequence ('meta.database is null when every database was checked'), which links the parameter choice to the output shape rather than just restating the schema.

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?

Specific verb+resource+scope: 'Test connectivity for one database (or all) — returns OK or a sanitized cause.' The agent immediately knows what the tool produces and how the scope is parameterized.

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 explicit triggers ('when a call fails with a connection error, or after starting a tunnel') and explicitly routes to the alternative ('run doctor for a full setup diagnosis') when the cause is unclear. When-to-use, when-to-escalate, and which sibling handles the escalation are all stated.

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