← Back to registry

TOOL · service_restart

No description provided.

Canonical Definition

{
  "function": {
    "description": "Restart a PM2-managed service by name. Use this when a service is down, unresponsive, or in a crash loop. Can optionally clear logs before restarting. This is the 'auto-heal' tool — use it after diagnose_services identifies a problem to actually fix it.",
    "name": "service_restart",
    "parameters": {
      "properties": {
        "flush_logs": {
          "description": "Whether to flush (clear) PM2 logs before restarting. Useful for crash loops where logs are huge. Defaults to false.",
          "type": "boolean"
        },
        "service_name": {
          "description": "PM2 process name to restart (e.g., 'vetra-rust', 'cartera-rust', 'movilo', 'sentinel', 'hera-core'). Use the exact PM2 name.",
          "type": "string"
        }
      },
      "required": [
        "service_name"
      ],
      "type": "object"
    }
  },
  "type": "function"
}