source_write
Validates and atomically replaces an existing X++ source file, preserving encoding and newlines, with a dry-run diff by default.
Instructions
Dry-run or atomically replace an existing source file after validation, preserving encoding and newlines.
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": {
"path": "<path>",
"content": "<content>"
},
"name": "source_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| root | No | ||
| dryRun | No | ||
| content | Yes | ||
| expectedSha256 | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| diff | No | ||
| path | No | ||
| error | No | ||
| dryRun | No | ||
| sha256 | No | ||
| changed | No | ||
| diagnostics | No | ||
| diffTruncated | No | ||
| previousSha256 | No |