restart_database
Restart a database in Coolify to resolve issues or apply changes. Provide the database UUID and confirmation when required for safety.
Instructions
Restart a database. When COOLIFY_REQUIRE_CONFIRM=true, requires confirm: true parameter.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Database UUID | |
| confirm | No | Confirm the dangerous operation (required when COOLIFY_REQUIRE_CONFIRM=true) |
Implementation Reference
- src/tools/handlers.ts:411-413 (handler)The core handler logic for the 'restart_database' tool. It requires a 'uuid' parameter for the database and calls the Coolify API's restart endpoint.case 'restart_database': requireParam(args, 'uuid'); return client.get(`/databases/${args.uuid}/restart`);
- src/tools/definitions.ts:1118-1129 (schema)The input schema and metadata for the 'restart_database' tool, defining parameters uuid (required) and confirm (optional). This is part of the allToolDefinitions array used for MCP tool registration.{ name: 'restart_database', description: 'Restart a database. When COOLIFY_REQUIRE_CONFIRM=true, requires confirm: true parameter.', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Database UUID' }, confirm: { type: 'boolean', description: 'Confirm the dangerous operation (required when COOLIFY_REQUIRE_CONFIRM=true)' } }, required: ['uuid'] } },
- src/tools/definitions.ts:45-64 (helper)'restart_database' is listed as a dangerous operation, which may require confirmation based on COOLIFY_REQUIRE_CONFIRM environment variable.export const DANGEROUS_OPERATIONS = [ 'stop_application', 'restart_application', 'stop_service', 'restart_service', 'stop_database', 'restart_database', 'deploy_application', 'deploy', 'execute_command', 'delete_server', 'delete_project', 'delete_environment', 'delete_application', 'delete_service', 'delete_database', 'delete_private_key', 'delete_github_app', 'cancel_deployment' ];
- src/tools/definitions.ts:73-73 (helper)Warning message for the 'restart_database' dangerous operation.restart_database: 'This will restart the database, causing brief downtime.',
- src/index.ts:36-38 (registration)MCP server registers all tools (including 'restart_database') by providing the list from getToolDefinitions() in response to ListTools requests.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));