list_projects
Retrieve all projects from your Coolify self-hosted PaaS instance to view deployments, manage applications, and monitor server resources.
Instructions
List all projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers.ts:104-105 (handler)Handler implementation for the 'list_projects' tool. Dispatches to Coolify API GET /projects endpoint.case 'list_projects': return client.get('/projects');
- src/tools/definitions.ts:204-208 (schema)Schema definition for the 'list_projects' tool, including name, description, and empty input schema (no parameters required).{ name: 'list_projects', description: 'List all projects', inputSchema: { type: 'object', properties: {}, required: [] } },
- src/index.ts:36-38 (registration)Registration of all tools (including list_projects) via ListToolsRequestHandler using getToolDefinitions() which sources from definitions.ts.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/index.ts:41-67 (registration)Registration of tool execution handler (CallToolRequestHandler) that dispatches to handleTool based on tool name, handling list_projects case.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { if (!this.client) { throw new McpError(ErrorCode.InternalError, 'Client not initialized'); } const { name, arguments: args } = request.params; // Block write operations in read-only mode if (isReadOnlyMode() && !READ_ONLY_TOOLS.includes(name)) { throw new McpError( ErrorCode.InvalidRequest, `Operation '${name}' is not allowed in read-only mode. Set COOLIFY_READONLY=false to enable write operations.` ); } try { const result = await handleTool(this.client, name, args || {}); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { if (error instanceof McpError) throw error; const message = error instanceof Error ? error.message : 'Unknown error'; throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${message}`); } });
- src/tools/definitions.ts:16-16 (helper)Inclusion of 'list_projects' in READ_ONLY_TOOLS array, ensuring it's available in read-only mode.'list_projects',