Skip to main content
Glama

List Databases

db_list_databases
Read-onlyIdempotent

Lists all configured databases with connection status, host, port, schema, and read-only flag, enabling you to discover available options and verify connectivity before selecting a database.

Instructions

Lists all databases configured in pgautopilot.json for multi-database mode, including each database's connection status (connected, not connected, or error), host, port, schema, and read-only setting. This tool is only meaningful in multi-database mode — in single-database mode it returns a message indicating only one database is configured.

When to use:

  • As the first call when the user wants to work with a specific named database.

  • To discover which databases are available before calling db_use_database.

  • To verify that all configured databases are reachable.

Returns: an array of database entries with name, connection summary, status (connected | not connected | error), and readonly flag. Databases that failed to connect at startup will show 'not connected' and will be lazily connected on first use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds valuable behavioral context beyond those: the single-database mode fallback message, how failed connections appear, and the lazy connection behavior on first use. It does not contradict 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?

The description is organized with the core function first, followed by usage guidance and return details. It is longer than strictly necessary but every sentence adds useful information, such as status values and lazy connection behavior, rather than repeating schema or annotation data.

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?

There is no output schema, so the description correctly compensates by specifying the array shape and its fields. It also covers edge behavior (single-database mode, failed startup connections) and practical usage context. For a parameterless discovery tool, nothing important is missing.

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?

The tool has zero parameters and the input schema confirms this, so the baseline is 4. The description correctly avoids inventing parameter semantics and instead explains what the returned entries contain, which is appropriate for a parameterless tool.

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 clear verb ('Lists') and specific resource ('databases configured in pgautopilot.json'), and specifies exactly what fields are shown, including connection status, host, port, schema, and read-only setting. It also differentiates the tool's purpose by noting it is meaningful only in multi-database mode.

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?

Provides explicit 'When to use' guidance with three concrete scenarios, positions it as a precursor to db_use_database, and notes when it is not meaningful (single-database mode). This is strong routing guidance relative to alternatives.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyberreinxy/pgautopilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server