swap_server
Replace the model running on a given port with a different one, performing a five-phase swap with automatic rollback on failure. Handles no-ops if the model is already running.
Instructions
Replace the model on this port with a different one. Primary use: an agent replacing its own brain on the harness's expected port. Performs the 5-phase swap (pre-flight, marker, stop, start, readiness) with rollback to the previous model on failure. Calling with the model already running on the port is a successful no-op (action='already_running'). Fails with action='rejected_empty' if the port is empty — use start_server for that case.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"port": "<port>",
"model_name": "<model_name>"
},
"name": "swap_server"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | Port number to swap the model on | |
| model_name | Yes | Name of the new model to start |