Skip to main content
Glama

coolify_databases

Manage databases in Coolify infrastructure: create, list, retrieve, update, and delete databases with support for PostgreSQL, MySQL, MongoDB, Redis, and other database types.

Instructions

Database CRUD operations - list, create, get, update, and delete databases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: list (list all databases), create (create new database), get (get database by UUID), update (update database), delete (delete database)
uuidNoDatabase UUID (required for get, update, delete actions)
nameNoDatabase name (required for create, optional for update)
descriptionNoDatabase description (optional for create and update)
typeNoDatabase type (required for create action)
server_uuidNoServer UUID (required for create action)
project_uuidNoProject UUID (required for create action)
environment_nameNoEnvironment name (required for create action)
pageNoPage number (optional for list action)
per_pageNoItems per page (optional for list action)

Implementation Reference

  • Handler function that executes the coolify_databases tool logic for actions: list, create, get, update, delete by making API calls to Coolify endpoints.
    async databases(action: string, args: any) {
      switch (action) {
        case 'list':
          const queryString = this.apiClient.buildQueryString(args);
          const response = await this.apiClient.get(`/databases?${queryString}`);
          return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
        case 'create':
          if (!args.type) throw new Error('Database type is required for create action');
          const endpoint = `/databases/${args.type}`;
          const createResponse = await this.apiClient.post(endpoint, args);
          return { content: [{ type: 'text', text: JSON.stringify(createResponse.data, null, 2) }] };
        case 'get':
          if (!args.uuid) throw new Error('Database UUID is required for get action');
          const getResponse = await this.apiClient.get(`/databases/${args.uuid}`);
          return { content: [{ type: 'text', text: JSON.stringify(getResponse.data, null, 2) }] };
        case 'update':
          if (!args.uuid) throw new Error('Database UUID is required for update action');
          const updateResponse = await this.apiClient.patch(`/databases/${args.uuid}`, {
            name: args.name,
            description: args.description,
          });
          return { content: [{ type: 'text', text: JSON.stringify(updateResponse.data, null, 2) }] };
        case 'delete':
          if (!args.uuid) throw new Error('Database UUID is required for delete action');
          await this.apiClient.delete(`/databases/${args.uuid}`);
          return { content: [{ type: 'text', text: 'Database deleted successfully' }] };
        default:
          throw new Error(`Unknown databases action: ${action}`);
      }
    }
  • Input schema definition for the coolify_databases tool defining parameters for CRUD operations on databases.
      name: 'coolify_databases',
      description: 'Database CRUD operations - list, create, get, update, and delete databases',
      inputSchema: {
        type: 'object',
        properties: {
          action: { 
            type: 'string', 
            enum: ['list', 'create', 'get', 'update', 'delete'],
            description: 'Action to perform: list (list all databases), create (create new database), get (get database by UUID), update (update database), delete (delete database)'
          },
          uuid: { 
            type: 'string', 
            description: 'Database UUID (required for get, update, delete actions)' 
          },
          name: { 
            type: 'string', 
            description: 'Database name (required for create, optional for update)' 
          },
          description: { 
            type: 'string', 
            description: 'Database description (optional for create and update)' 
          },
          type: { 
            type: 'string', 
            enum: ['postgresql', 'mysql', 'mongodb', 'redis', 'mariadb', 'clickhouse', 'dragonfly', 'keydb'],
            description: 'Database type (required for create action)' 
          },
          server_uuid: { 
            type: 'string', 
            description: 'Server UUID (required for create action)' 
          },
          project_uuid: { 
            type: 'string', 
            description: 'Project UUID (required for create action)' 
          },
          environment_name: { 
            type: 'string', 
            description: 'Environment name (required for create action)' 
          },
          page: { 
            type: 'number', 
            description: 'Page number (optional for list action)' 
          },
          per_page: { 
            type: 'number', 
            description: 'Items per page (optional for list action)' 
          },
        },
        required: ['action'],
      },
    },
  • src/index.ts:85-142 (registration)
    Tool dispatch registration in the MCP server's handleToolCall switch statement, routing coolify_databases calls to the handlers.databases method.
    private async handleToolCall(name: string, args: any) {
      switch (name) {
        // System Management
        case 'coolify_system':
          return await this.handlers.system(args.action);
        
        // Team Management
        case 'coolify_teams':
          return await this.handlers.teams(args.action, args.team_id);
        
        // Project Management
        case 'coolify_projects':
          return await this.handlers.projects(args.action, args);
        case 'coolify_project_environments':
          return await this.handlers.projectEnvironments(args.action, args);
        
        // Application Management
        case 'coolify_applications':
          return await this.handlers.applications(args.action, args);
        case 'coolify_application_lifecycle':
          return await this.handlers.applicationLifecycle(args.action, args.uuid);
        case 'coolify_application_envs':
          return await this.handlers.applicationEnvs(args.action, args);
        case 'coolify_logs':
          return await this.handlers.logs(args.action, args.uuid, args.lines);
        case 'coolify_application_deployments':
          return await this.handlers.applicationDeployments(args.action, args);
        
        // Database Management
        case 'coolify_databases':
          return await this.handlers.databases(args.action, args);
        case 'coolify_database_lifecycle':
          return await this.handlers.databaseLifecycle(args.action, args.uuid);
        case 'coolify_database_types':
          return await this.handlers.databaseTypes(args.action, args);
        
        // Server Management
        case 'coolify_servers':
          return await this.handlers.servers(args.action, args);
        case 'coolify_server_management':
          return await this.handlers.serverManagement(args.action, args.uuid);
        
        // Service Management
        case 'coolify_services':
          return await this.handlers.services(args.action, args);
        case 'coolify_service_lifecycle':
          return await this.handlers.serviceLifecycle(args.action, args.uuid);
        case 'coolify_service_envs':
          return await this.handlers.serviceEnvs(args.action, args);
        
        // Security Keys Management
        case 'coolify_security_keys':
          return await this.handlers.securityKeys(args.action, args);
        
        default:
          throw new CoolifyError(`Unknown tool: ${name}`, 400);
      }
    }
  • src/index.ts:60-64 (registration)
    Registration of tool list handler providing the coolify_databases tool schema via getTools() from tools.ts.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: getTools(),
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. It states the operations but doesn't describe side effects (e.g., delete is irreversible), authentication needs, rate limits, error handling, or response formats. For a multi-action tool with destructive operations, this is a significant gap in transparency.

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, efficient sentence that front-loads the core purpose. It wastes no words but could be more structured by separating operations or adding brief context. For a multi-action tool, it's appropriately concise though slightly dense.

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?

Given the tool's complexity (10 parameters, multiple actions including destructive ones), no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects, error cases, or return values. For a CRUD tool with delete/update operations, more context is needed to use it safely and effectively.

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 description coverage is 100%, providing detailed parameter documentation. The description adds no additional parameter semantics beyond the schema's action list. It doesn't explain dependencies between parameters (e.g., uuid required for specific actions) or provide usage examples. Baseline 3 is appropriate as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool performs 'Database CRUD operations' with specific verbs (list, create, get, update, delete) and the resource (databases). It distinguishes from siblings like coolify_database_types or coolify_database_lifecycle by focusing on core database management rather than types or lifecycle states. However, it doesn't explicitly differentiate from all siblings (e.g., coolify_applications also manages resources).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing server/project UUIDs from other tools), when to choose list vs get, or how it relates to siblings like coolify_database_lifecycle for state changes. Usage is implied through the action parameter but not explicitly stated.

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/HowieDuhzit/CoolifyMCP'

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