get_service_logs
Retrieve service logs for monitoring and troubleshooting applications deployed on Coolify. Specify the service UUID and number of log lines to access operational data.
Instructions
Get logs from a service. NOTE: This endpoint is not available in Coolify API and will return an error. Service logs are not exposed via the API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Service UUID | |
| lines | No | Number of lines (default: 100) |
Implementation Reference
- src/tools/handlers.ts:316-320 (handler)The handler case in the main handleTool switch statement that implements the get_service_logs tool. It requires a 'uuid' parameter and returns an error explaining that service logs are not available in the Coolify API.case 'get_service_logs': requireParam(args, 'uuid'); // This endpoint doesn't exist in Coolify API // Services don't have a direct logs endpoint like applications return { error: 'Service logs endpoint is not available in Coolify API. Service logs are not exposed via the API.' };
- src/tools/definitions.ts:507-517 (schema)The tool schema definition for get_service_logs, specifying the input parameters (uuid required, lines optional). This is part of the allToolDefinitions array used for MCP tool registration.{ name: 'get_service_logs', description: 'Get logs from a service. NOTE: This endpoint is not available in Coolify API and will return an error. Service logs are not exposed via the API.', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Service UUID' }, lines: { type: 'number', description: 'Number of lines (default: 100)', default: 100 } }, required: ['uuid'] }
- src/index.ts:36-38 (registration)Registration of all tools via ListToolsRequestHandler, which returns getToolDefinitions() including the get_service_logs schema.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/index.ts:41-67 (registration)The CallToolRequestHandler that dispatches to handleTool based on tool name, effectively registering the execution handler for get_service_logs via the switch in handleTool.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:28-28 (helper)Inclusion in READ_ONLY_TOOLS array, allowing the tool in read-only mode.'get_service_logs',