{ "wire_name": "StrReplace", "description": "Replaces an exact string in a file with a new string. The old string must be unique in the file unless replace_all is true, so include enough surrounding context to identify the one occurrence you mean. Read the file first.\n\nUsage:\n- old_string is matched exactly, so whitespace, indentation, and line endings count. The line number and the pipe that Read shows are not part of the file.\n- When old_string does not occur exactly once, the call fails and says how many times it occurs. With replace_all set to true, the call replaces every occurrence, and it fails only when there is none.\n- Only UTF-8 text is edited. A file over {file_ceiling} bytes is refused.\n- The calls in one response that change files run one after another, in the order you list them.", "parameters": { "type": "object", "properties": { "path": { "type": "string", "description": "The absolute path of the file to modify" }, "old_string": { "type": "string", "description": "The text to replace" }, "new_string": { "type": "string", "description": "The text to replace it with (must be different from old_string)" }, "replace_all": { "type": "boolean", "description": "Replace all occurrences of old_string (default false)" } }, "required": ["path", "old_string", "new_string"] } }