json_set
Set a value at a jq-like path in local JSON or JSONC, returning updated JSON or writing to a file. Works on strings or file paths without network calls.
Instructions
Set a value at a jq-like path; returns updated JSON (optionally write file). Local files/strings only. Does not fetch URLs or contact external services.
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>"
},
"name": "json_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| text | No | Raw JSON/JSONC string (alternative to filePath). | |
| value | No | ||
| indent | No | ||
| minify | No | ||
| filePath | No | Local JSON/JSONC file path. | |
| outputPath | No | ||
| parseValue | No | If value is a string, try JSON.parse. |