Edit files (patch)
apply_patchChange existing files in the sandbox repository and commit it on the session's ronda branch (not pushed to GitHub until open_pr). The preferred way to edit. Accepts a unified diff or a '*** Begin Patch' envelope; it can modify, rename and delete lines and files. All-or-nothing: on mismatch nothing changes and the error explains why (re-read the file and regenerate). Retrying an already-applied patch returns alreadyApplied:true. The preview hot-reloads. Changes take effect in the isolated sandbox, where the project's code (including package.json scripts you change) can run via run_script. Optionally pass anchors (up to 3) and anchorRoute: visible text on the changed page that points at the change, used by the Show me link; ronda checks each against the page and the change and drops any it cannot find.
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": {
"sessionId": "<sessionId>",
"patch": "<patch>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | Either a unified diff (git style, `--- a/path` / `+++ b/path` with @@ hunks) or a `*** Begin Patch` … `*** End Patch` envelope (Update File / Add File / Delete File). | |
| anchors | No | Up to 3 pieces of visible page text that point at the change, used by the Show me link; ronda checks each against the page and the change and drops any it cannot find. | |
| context | No | A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as "a customer". Do not quote the user or include names, emails, or other personal details. | |
| message | No | Short description of the change; used as the commit message and edit summary. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| sessionId | Yes | The ronda session id, from open_session or list_sessions. | |
| anchorRoute | No | Page path the anchors are on, e.g. '/pricing'. Omit for the page ronda infers from the change. |