open_file
Open a file in the VS Code editor to view or edit it, particularly after creating a new file or applying changes via create_diff. Specify file path and project folder; optionally set view column, focus preservation, and preview mode.
Instructions
Used to open a file in the VS Code editor. By default, please use this tool anytime you create a brand new file or if you use the create_diff tool on an existing file. We want to see changed and newly created files in the editor.
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": {
"filePath": "<filePath>",
"targetProjectPath": "<targetProjectPath>"
},
"name": "open_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the file to open | |
| targetProjectPath | Yes | Path to the project folder we are working in | |
| viewColumn | No | The view column to open the file in (1, 2, 3, etc.) | |
| preserveFocus | No | Whether to preserve focus on the current editor | |
| preview | No | Whether to open the file in preview mode |