create_environment
Create a new environment in a Coolify project to deploy applications, manage databases, and monitor servers directly from AI assistants.
Instructions
Create a new environment in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_uuid | Yes | Project UUID | |
| name | Yes | Environment name (e.g., production, staging) |
Implementation Reference
- src/tools/handlers.ts:120-123 (handler)The main handler logic for the 'create_environment' tool. It validates the required parameters 'project_uuid' and 'name', then sends a POST request to the Coolify API endpoint `/projects/{project_uuid}/environments` with the provided arguments to create the environment.case 'create_environment': requireParam(args, 'project_uuid'); requireParam(args, 'name'); return client.post(`/projects/${args.project_uuid}/environments`, args);
- src/tools/definitions.ts:241-252 (schema)The tool definition object in the allToolDefinitions array, providing the name, description, and inputSchema used for MCP tool registration and validation.{ name: 'create_environment', description: 'Create a new environment in a project', inputSchema: { type: 'object', properties: { project_uuid: { type: 'string', description: 'Project UUID' }, name: { type: 'string', description: 'Environment name (e.g., production, staging)' } }, required: ['project_uuid', 'name'] } },
- src/types.ts:127-130 (schema)TypeScript interface defining the expected input shape for the create_environment tool parameters.export interface CreateEnvironmentInput { project_uuid: string; name: string; }
- src/index.ts:36-37 (registration)MCP server registration of all tools via ListToolsRequestSchema handler, which returns the list including 'create_environment' from getToolDefinitions().this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions()