list_environments
Retrieve all environments within a specified Coolify project to manage deployments, databases, and server operations.
Instructions
List environments in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_uuid | Yes | Project UUID |
Implementation Reference
- src/tools/handlers.ts:116-118 (handler)The switch case handler for the 'list_environments' tool. It requires a 'project_uuid' parameter and makes a GET request to the Coolify API endpoint `/projects/{project_uuid}/environments` to retrieve the list of environments.case 'list_environments': requireParam(args, 'project_uuid'); return client.get(`/projects/${args.project_uuid}/environments`);
- src/tools/definitions.ts:233-240 (schema)The JSON schema definition for the 'list_environments' tool, specifying the input parameters, description, and validation rules.name: 'list_environments', description: 'List environments in a project', inputSchema: { type: 'object', properties: { project_uuid: { type: 'string', description: 'Project UUID' } }, required: ['project_uuid'] } },
- src/index.ts:36-38 (registration)Registration of the tool list endpoint which dynamically provides all tool definitions, including 'list_environments', via getToolDefinitions() from tools/definitions.ts.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/tools/definitions.ts:18-18 (helper)'list_environments' is listed in the READ_ONLY_TOOLS array, indicating it is available even in read-only mode and used for filtering tool availability.'list_environments',
- src/tools/handlers.ts:504-508 (helper)Helper function requireParam used by the list_environments handler to validate the presence of the required 'project_uuid' argument.function requireParam(args: ToolArgs, param: string): void { if (!args[param]) { throw new McpError(ErrorCode.InvalidParams, `${param} is required`); } }