formatAndSave
Format a file and save it in one call. Errors during formatting prevent saving, ensuring file integrity.
Instructions
Format a file and save it in one call (formatDocument + saveDocument). Formatter errors propagate; save is not attempted on format failure.
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>"
},
"name": "formatAndSave"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the file (absolute or workspace-relative) |