list_services
Retrieve all deployed services from a Coolify self-hosted PaaS instance to manage applications, databases, and server operations.
Instructions
List all services
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers.ts:293-294 (handler)The handler case in the handleTool switch statement that implements the list_services tool by calling GET /services on the CoolifyClient.case 'list_services': return client.get('/services');
- src/tools/definitions.ts:502-506 (schema)The JSON schema definition for the list_services tool, specifying its name, description, and input schema (no required parameters).{ name: 'list_services', description: 'List all services', inputSchema: { type: 'object', properties: {}, required: [] } },
- src/index.ts:36-38 (registration)Registration of all tool schemas (including list_services) via the MCP server's ListToolsRequestHandler, which returns getToolDefinitions() containing the tool's schema.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/index.ts:41-67 (registration)MCP server registration for tool execution (CallToolRequestSchema), which dispatches to handleTool based on tool name, enabling execution of list_services.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:25-25 (helper)list_services is listed in READ_ONLY_TOOLS array, allowing it in read-only mode and used for permission checks.'list_services',