get_application_logs
Retrieve application logs by UUID to debug errors, monitor performance, and troubleshoot deployment issues in Coolify applications.
Instructions
Get application logs by UUID. Essential for debugging and monitoring application behavior, errors, and performance issues. Retrieve logs from running applications to troubleshoot deployment issues and monitor application health.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of lines to show from the end of the logs. Controls log volume for performance. Default is 100 lines. | |
| uuid | Yes | UUID of the application to retrieve logs for. Get this from list_applications. |
Implementation Reference
- src/index.ts:1474-1485 (handler)Handler implementation for the get_application_logs tool. Fetches logs from the Coolify API endpoint `/applications/{uuid}/logs` with optional lines parameter.case 'get_application_logs': const uuid = request.params.arguments?.uuid; const lines = request.params.arguments?.lines || 100; if (!uuid) { throw new McpError(ErrorCode.InvalidParams, 'uuid is required'); } const logsResponse = await this.axiosInstance.get(`/applications/${uuid}/logs`, { params: { lines } }); return { content: [{ type: 'text', text: JSON.stringify(logsResponse.data, null, 2) }] };
- src/index.ts:1019-1071 (registration)Registration of the get_application_logs tool in the ListTools response, including detailed description and input schema definition.name: 'get_application_logs', description: 'Get application logs by UUID. Essential for debugging and monitoring application behavior, errors, and performance issues. Retrieve logs from running applications to troubleshoot deployment issues and monitor application health.', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'UUID of the application to retrieve logs for. Get this from list_applications.', pattern: '^[a-zA-Z0-9]+$', examples: ['sg4gsws44wksg040o4ok80ww'] }, lines: { type: 'number', description: 'Number of lines to show from the end of the logs. Controls log volume for performance. Default is 100 lines.', minimum: 1, default: 100, examples: [100, 500, 1000] } }, required: ['uuid'], examples: [ { uuid: 'sg4gsws44wksg040o4ok80ww' }, { uuid: 'sg4gsws44wksg040o4ok80ww', lines: 500 } ], additionalInfo: { responseFormat: 'Returns JSON object with "logs" field containing application log entries as a string', usage: 'Essential for application debugging, error investigation, and monitoring application behavior', workflow: [ '1. Get the application UUID from list_applications', '2. Optionally specify number of log lines to retrieve (default 100)', '3. Review logs for errors, warnings, or application behavior', '4. Use with other tools for comprehensive troubleshooting' ], relatedTools: [ 'list_applications - Get UUIDs of available applications', 'execute_command_application - Run debugging commands in the application', 'restart_application - Restart application if issues found in logs', 'get_deployment - Check deployment status if log errors relate to deployment' ], notes: [ 'Logs are retrieved from the end (most recent entries first)', 'Large line counts may take longer to retrieve and display', 'Use this tool for debugging deployment issues, runtime errors, and monitoring', 'Logs show application stdout/stderr and container lifecycle events' ] } } },
- src/index.ts:116-116 (helper)Feature availability check for the application_logs tool in isFeatureAvailable method.return beta ? beta >= 380 : major >= 4; // Available from beta.380+