context_remove
Remove a Docker CLI context by name, deleting only connection metadata while leaving the daemon untouched. Use force to remove the current context.
Instructions
Remove a Docker CLI context.
Deletes only the CLI's connection metadata - the daemon it pointed at is untouched. The
current context needs force=True (or context_use another first).
Does not raise on a non-zero CLI exit (a missing docker binary or a timeout still raises) - inspect
returncode/stderr in the result.
Args: name: Context name to remove force: Force removal even if the context is the current one
Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
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": {
"name": "<name>"
},
"name": "context_remove"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| force | No |