configure_workspace
Save named startup tabs/viewports and a screenshot directory on this workspace. Optional branch+worktree_path creates a Git worktree in a NEW folder; existing shells are left running and future shells use it. Closing/removing the workspace never deletes the worktree.
Example#
Call this MCP tool with the argument object below. Replace illustrative IDs, selectors, local paths, and project URLs with values observed in your session.
{
"startup_tabs": [
{
"name": "app",
"url": "http://localhost:3000",
"viewport": {
"preset": "desktop"
}
}
]
}Usage notes#
The example URL assumes your development server runs on port 3000. A branch/worktree operation writes local Git state. Closing or removing a workspace does not delete the worktree.
Result#
Returns the saved workspace configuration and any configured worktree information. Existing shells remain running; later shells can use the configured worktree.
Results arrive in MCP content blocks. Most structured results are JSON in text blocks; image tools can include image blocks. Handle errors and partial or truncated data. No formal output schema is declared for this tool.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
startup_tabs | array of object | No | maxItems: 20 |
screenshot_dir | string | No | minLength: 1 |
branch | string | No | minLength: 1 |
worktree_path | string | No | minLength: 1 |
tab | string | No | Tab name or id in your workspace; does not change the visible tab. minLength: 1 |
Full input schema#
The schema includes nested shapes and constraints. Additional semantic constraints can apply at runtime; read the description and usage notes.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"startup_tabs": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"url": {
"type": "string",
"format": "uri"
},
"viewport": {
"anyOf": [
{
"type": "object",
"properties": {
"preset": {
"type": "string",
"enum": [
"mobile",
"tablet",
"laptop",
"desktop",
"wide"
]
}
},
"required": [
"preset"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 240,
"maximum": 3840
},
"height": {
"type": "integer",
"minimum": 320,
"maximum": 2400
}
},
"required": [
"width",
"height"
],
"additionalProperties": false
}
]
}
},
"required": [
"name",
"url"
],
"additionalProperties": false
}
},
"screenshot_dir": {
"type": "string",
"minLength": 1
},
"branch": {
"type": "string",
"minLength": 1
},
"worktree_path": {
"type": "string",
"minLength": 1
},
"tab": {
"description": "Tab name or id in your workspace; does not change the visible tab.",
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}Related documentation#
Reference conventions · Agent operating guide · Troubleshooting