Skip to main content
Glama

create_database

Create a new database for applications on Coolify PaaS. Supports PostgreSQL, MySQL, MariaDB, MongoDB, Redis, ClickHouse, Dragonfly, and KeyDB types.

Instructions

Create a new database. Valid types: postgresql, mysql, mariadb, mongodb, redis, clickhouse, dragonfly, keydb

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDatabase name
typeYesDatabase type (postgresql, mysql, mariadb, mongodb, redis, clickhouse, dragonfly, keydb)
project_uuidYesProject UUID
environment_nameYesEnvironment name
server_uuidYesServer UUID

Implementation Reference

  • Handler implementation that validates input parameters, maps the database type to the appropriate Coolify API endpoint, validates the type, and sends a POST request to create the database.
    case 'create_database': requireParam(args, 'name'); requireParam(args, 'type'); requireParam(args, 'project_uuid'); requireParam(args, 'environment_name'); requireParam(args, 'server_uuid'); // Coolify uses type-specific endpoints for database creation const dbType = String(args.type).toLowerCase(); const validTypes: Record<string, string> = { 'postgresql': '/databases/postgresql', 'mysql': '/databases/mysql', 'mariadb': '/databases/mariadb', 'mongodb': '/databases/mongodb', 'redis': '/databases/redis', 'clickhouse': '/databases/clickhouse', 'dragonfly': '/databases/dragonfly', 'keydb': '/databases/keydb' }; const endpoint = validTypes[dbType]; if (!endpoint) { throw new McpError(ErrorCode.InvalidParams, `Invalid database type: ${dbType}. Valid types are: ${Object.keys(validTypes).join(', ')}`); } return client.post(endpoint, args);
  • Tool registration definition including the name, description, and input schema for the MCP tool system.
    name: 'create_database', description: 'Create a new database. Valid types: postgresql, mysql, mariadb, mongodb, redis, clickhouse, dragonfly, keydb', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Database name' }, type: { type: 'string', description: 'Database type (postgresql, mysql, mariadb, mongodb, redis, clickhouse, dragonfly, keydb)' }, project_uuid: { type: 'string', description: 'Project UUID' }, environment_name: { type: 'string', description: 'Environment name' }, server_uuid: { type: 'string', description: 'Server UUID' } }, required: ['name', 'type', 'project_uuid', 'environment_name', 'server_uuid'] }
  • TypeScript interface defining the structure of the input parameters for creating a database.
    export interface CreateDatabaseInput { name: string; type: string; project_uuid: string; environment_name: string; server_uuid: string; }

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

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