get_database_logs
Retrieve database logs by UUID to monitor performance and troubleshoot issues. Specify the number of log lines to fetch for targeted analysis.
Instructions
Get logs from a database. NOTE: This endpoint is not available in Coolify API and will return an error. Database logs are not exposed via the API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Database UUID | |
| lines | No | Number of lines (default: 100) |
Implementation Reference
- src/tools/handlers.ts:386-389 (handler)Handler implementation for the 'get_database_logs' tool. It checks for the required 'uuid' parameter and returns an error message indicating that database logs are not exposed via the Coolify API.case 'get_database_logs': requireParam(args, 'uuid'); // This endpoint doesn't exist in Coolify API return { error: 'Database logs endpoint is not available in Coolify API. Database logs are not exposed via the API.' };
- src/tools/definitions.ts:574-585 (schema)Schema definition for the 'get_database_logs' tool, including input schema requiring 'uuid' and optional 'lines' parameters.{ name: 'get_database_logs', description: 'Get logs from a database. NOTE: This endpoint is not available in Coolify API and will return an error. Database logs are not exposed via the API.', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Database UUID' }, lines: { type: 'number', description: 'Number of lines (default: 100)', default: 100 } }, required: ['uuid'] } },
- src/index.ts:41-67 (registration)MCP server request handler for tool calls (CallToolRequestSchema), which dispatches to handleTool based on tool name, including checks for read-only mode.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/index.ts:36-38 (registration)MCP server request handler for listing tools (ListToolsRequestSchema), which returns all tool definitions from getToolDefinitions().this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));