Skip to main content
Glama

list-databases

Fetch a list of all databases managed by Coolify to view database instances and monitor resources.

Instructions

Fetch a list of all databases managed by Coolify. This provides an overview of all database instances.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list-databases' tool. Calls the Coolify API endpoint '/databases' and returns the list of databases as formatted JSON text.
    case "list-databases": {
      const databases = await coolifyApiCall('/databases');
      return {
        content: [{
          type: "text",
          text: JSON.stringify(databases, null, 2)
        }]
      };
    }
  • src/index.ts:119-122 (registration)
    Tool registration in the listTools response, defining name, description, and empty input schema (no parameters required).
      name: "list-databases",
      description: "Fetch a list of all databases managed by Coolify. This provides an overview of all database instances.",
      inputSchema: zodToJsonSchema(z.object({})),
    },
  • Input schema for list-databases tool: empty object (no input parameters).
    inputSchema: zodToJsonSchema(z.object({})),
  • Shared helper function coolifyApiCall used by list-databases (and other tools) to make authenticated API calls to Coolify backend.
    async function coolifyApiCall(endpoint: string, method: string = 'GET', body?: any): Promise<any> {
      const baseUrl = process.env.COOLIFY_BASE_URL?.replace(/\/$/, '') || 'https://coolify.stuartmason.co.uk';
      const url = `${baseUrl}/api/v1${endpoint}`;
    
      const response = await fetch(url, {
        method,
        headers: {
          'Authorization': `Bearer ${process.env.COOLIFY_ACCESS_TOKEN}`,
          'Content-Type': 'application/json',
        },
        body: body ? JSON.stringify(body) : undefined,
      });
    
      if (!response.ok) {
        const errorBody = await response.json().catch(() => ({}));
        throw new Error(JSON.stringify({
          error: `Coolify API error: ${response.status} ${response.statusText}`,
          status: response.status,
          details: errorBody
        }));
      }
    
      return await response.json();
    }

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/StuMason/coolify-mcp-server'

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