Close a surface or workspace
cmux_closeCloses a terminal surface, tab, or workspace, including a pane's selected surface; safely previews and requires confirm=true to close the calling pane's own workspace.
Instructions
Close a surface (tab) or an entire workspace. For kind "surface" a pane ref also works (closes that pane's selected surface). For kind "workspace", ref "current" safely closes the CALLING pane's own workspace (never the UI-focused one) — first call previews it, call again with confirm=true to close.
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": {
"kind": "<kind>",
"ref": "<ref>"
},
"name": "cmux_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | e.g. "surface:40" or "workspace:26". Kind "surface" also accepts a pane ref like "pane:7". Kind "workspace" also accepts "current" for the calling pane's own workspace (requires confirm=true). | |
| kind | Yes | ||
| confirm | No | Required true when ref is "current"; ignored otherwise. |