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
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: create (create database of specific type) | |
| type | Yes | Database type (required for create action) | |
| name | Yes | Database name (required for create action) | |
| server_uuid | Yes | Server UUID (required for create action) | |
| project_uuid | Yes | Project UUID (required for create action) | |
| environment_name | Yes | Environment name (required for create action) | |
| postgresql_user | No | PostgreSQL user (optional for postgresql type) | |
| postgresql_password | No | PostgreSQL password (optional for postgresql type) | |
| postgresql_db | No | PostgreSQL database name (optional for postgresql type) | |
| mysql_user | No | MySQL user (optional for mysql type) | |
| mysql_password | No | MySQL password (optional for mysql type) | |
| mysql_database | No | MySQL database name (optional for mysql type) | |
| mysql_root_password | No | MySQL root password (optional for mysql type) | |
| mongodb_root_username | No | MongoDB root username (optional for mongodb type) | |
| mongodb_root_password | No | MongoDB root password (optional for mongodb type) | |
| mongodb_database | No | MongoDB database name (optional for mongodb type) | |
| mongodb_username | No | MongoDB username (optional for mongodb type) | |
| mongodb_password | No | MongoDB password (optional for mongodb type) | |
| redis_password | No | Redis password (optional for redis type) |
Implementation Reference
- src/handlers.ts:295-302 (handler)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'], }, },
- src/index.ts:118-119 (handler)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);