execute_recovery
Execute emergency recovery operations from a whitelisted set to restore VPS stability. Restart services, clean caches, prune logs, kill runaway processes, or apply security updates with targeted actions.
Instructions
Execute an emergency recovery operation from a strictly whitelisted list.
Allowed actions:
'restart_service': Restarts a systemd service (requires target=service_name, e.g. target='nginx').
'clean_docker_cache': Deep prune of unused containers, networks, images, and volumes.
'clean_system_logs': Prunes journal logs older than 3 days and rotated archives in /var/log.
'kill_process': Terminates a runaway process by PID (requires target=PID, e.g. target='12345').
'restart_nginx': Restarts Nginx web server (legacy alias for restart_service target='nginx').
'vacuum_systemd_journal': Truncates journal logs to limit (target defaults to '200M').
'clean_package_cache': Cleans APT archive cache and removes obsolete packages.
'apply_security_updates': Non-interactively applies pending operating system security updates.
'update_guardian': Self-updates VPS-Guardian-MCP from GitHub and refreshes virtual environment.
Args: action_name: The exact recovery action to execute. target: Optional target parameter required by certain actions.
Returns: JSON string with operation outcome, freed resources, or security error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| action_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |