Skip to main content
Glama

coolify_database_types

Create PostgreSQL, MySQL, MongoDB, or Redis databases with type-specific parameters for infrastructure management in Coolify environments.

Instructions

Specific database type creation - create PostgreSQL, MySQL, MongoDB, and Redis databases with type-specific parameters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: create (create database of specific type)
typeYesDatabase type (required for create action)
nameYesDatabase name (required for create action)
server_uuidYesServer UUID (required for create action)
project_uuidYesProject UUID (required for create action)
environment_nameYesEnvironment name (required for create action)
postgresql_userNoPostgreSQL user (optional for postgresql type)
postgresql_passwordNoPostgreSQL password (optional for postgresql type)
postgresql_dbNoPostgreSQL database name (optional for postgresql type)
mysql_userNoMySQL user (optional for mysql type)
mysql_passwordNoMySQL password (optional for mysql type)
mysql_databaseNoMySQL database name (optional for mysql type)
mysql_root_passwordNoMySQL root password (optional for mysql type)
mongodb_root_usernameNoMongoDB root username (optional for mongodb type)
mongodb_root_passwordNoMongoDB root password (optional for mongodb type)
mongodb_databaseNoMongoDB database name (optional for mongodb type)
mongodb_usernameNoMongoDB username (optional for mongodb type)
mongodb_passwordNoMongoDB password (optional for mongodb type)
redis_passwordNoRedis password (optional for redis type)

Implementation Reference

  • Core handler function for 'coolify_database_types' tool. Validates action as 'create' and required 'type', then POSTs to API endpoint `/databases/{type}` with arguments and returns formatted response.
    async databaseTypes(action: string, args: any) {
      if (action !== 'create') throw new Error('Only create action is supported for database types');
      if (!args.type) throw new Error('Database type is required for create action');
      
      const endpoint = `/databases/${args.type}`;
      const response = await this.apiClient.post(endpoint, args);
      return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
    }
  • src/tools.ts:429-481 (registration)
    Tool registration in getTools() array, defining name, description, and detailed inputSchema for 'coolify_database_types' with type-specific parameters for PostgreSQL, MySQL, MongoDB, Redis.
    {
      name: 'coolify_database_types',
      description: 'Specific database type creation - create PostgreSQL, MySQL, MongoDB, and Redis databases with type-specific parameters',
      inputSchema: {
        type: 'object',
        properties: {
          action: { 
            type: 'string', 
            enum: ['create'],
            description: 'Action to perform: create (create database of specific type)'
          },
          type: { 
            type: 'string', 
            enum: ['postgresql', 'mysql', 'mongodb', 'redis'],
            description: 'Database type (required for create action)' 
          },
          name: { 
            type: 'string', 
            description: 'Database name (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)' 
          },
          // PostgreSQL specific parameters
          postgresql_user: { type: 'string', description: 'PostgreSQL user (optional for postgresql type)' },
          postgresql_password: { type: 'string', description: 'PostgreSQL password (optional for postgresql type)' },
          postgresql_db: { type: 'string', description: 'PostgreSQL database name (optional for postgresql type)' },
          // MySQL specific parameters
          mysql_user: { type: 'string', description: 'MySQL user (optional for mysql type)' },
          mysql_password: { type: 'string', description: 'MySQL password (optional for mysql type)' },
          mysql_database: { type: 'string', description: 'MySQL database name (optional for mysql type)' },
          mysql_root_password: { type: 'string', description: 'MySQL root password (optional for mysql type)' },
          // MongoDB specific parameters
          mongodb_root_username: { type: 'string', description: 'MongoDB root username (optional for mongodb type)' },
          mongodb_root_password: { type: 'string', description: 'MongoDB root password (optional for mongodb type)' },
          mongodb_database: { type: 'string', description: 'MongoDB database name (optional for mongodb type)' },
          mongodb_username: { type: 'string', description: 'MongoDB username (optional for mongodb type)' },
          mongodb_password: { type: 'string', description: 'MongoDB password (optional for mongodb type)' },
          // Redis specific parameters
          redis_password: { type: 'string', description: 'Redis password (optional for redis type)' },
        },
        required: ['action', 'type', 'name', 'server_uuid', 'project_uuid', 'environment_name'],
      },
    },
  • Switch case in handleToolCall that routes 'coolify_database_types' calls to the handlers.databaseTypes method.
    case 'coolify_database_types':
      return await this.handlers.databaseTypes(args.action, args);

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