write_file
Create or overwrite files in an OpenFOAM case, including dictionaries, text inputs, and scripts. Use for new files; prefer set_dict for edits.
Instructions
Create or overwrite a file in a case (new dictionaries, STL-free text inputs, scripts). Prefer set_dict for edits.
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": {
"case": "<case>",
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| case | Yes | Case name in the workspace (e.g. 'pitzDaily') or an absolute path inside an allowed root. | |
| path | Yes | File path relative to the case. | |
| append | No | ||
| content | Yes |