Skip to main content
Glama

list_databases

Retrieve all databases on a server by providing its unique ID. This allows you to view, manage, and organize your database resources.

Instructions

List databases on a server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYesThe ID of the server

Implementation Reference

  • The handler function for the 'list_databases' tool. Calls client.listDatabases(server_id) and returns the result as formatted JSON text.
    async ({ server_id }) => {
      const databases = await client.listDatabases(server_id);
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(databases, null, 2),
          },
        ],
      };
    }
  • Zod schema defining the input parameter for 'list_databases': server_id (coerced number).
    {
      server_id: z.coerce.number().describe("The ID of the server"),
    },
  • Registration of the 'list_databases' tool via server.tool() inside registerDatabaseTools(), which is called from registerAllTools() in src/tools/index.ts (line 10) and ultimately from src/index.ts (line 127).
    export function registerDatabaseTools(server: McpServer, client: PloiClient) {
      server.tool(
        "list_databases",
        "List databases on a server",
        {
          server_id: z.coerce.number().describe("The ID of the server"),
        },
        async ({ server_id }) => {
          const databases = await client.listDatabases(server_id);
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(databases, null, 2),
              },
            ],
          };
        }
      );
  • Helper method on PloiClient that makes the GET request to /servers/{serverId}/databases and returns the list of Database objects.
    async listDatabases(serverId: number): Promise<Database[]> {
      const response = await this.request<PaginatedResponse<Database>>(
        "GET",
        `/servers/${serverId}/databases`
      );
      return response.data;
Behavior3/5

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

No annotations provided, so the description carries full burden. It indicates a read-only operation implicitly, but does not elaborate on behavior like pagination, sorting, or potential errors. Adequate but lacks depth.

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 a single short sentence with no wasted words. However, it could be structured to include additional context without being verbose.

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

Completeness2/5

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

No output schema is provided, and the description does not mention what information is returned (e.g., database names, sizes). For a list operation, details about the output are important for the agent to understand the response.

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% for the single parameter 'server_id' with a description. The tool description adds no additional meaning beyond what the schema already provides.

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?

The description 'List databases on a server' clearly states the action (list) and resource (databases). It is distinct from sibling tools like create_database_backup or deploy_project, which have different purposes.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. The description does not mention prerequisites, context, or scenarios where other tools would be more appropriate.

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

Install Server

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/sudanese/ploi-mcp'

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