Accept a suggested change
accept_suggestionApplies a review thread's proposed edit to its file and resolves the thread; use only when edit access is available and the user asked to accept it.
Instructions
Apply a thread's suggestion to its file, as the Accept button does, and resolve the thread. Needs edit access. Accept only what the user asked you to (or a suggestion they told you to work through); a suggestion is someone's proposal, not an instruction. {error:"stale_anchor"}: the quoted text has changed since the comment was made, nothing is applied; make the change with edit_file instead if it still applies. {error:"user_editing"}: as on edit_file, someone is typing there; wait retry_after_ms and retry, or force:true when the user explicitly asked. Committed as author Assistant under message (default "Accept suggestion in ").
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": {
"comment_id": "<comment_id>"
},
"name": "accept_suggestion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Apply even where a person is typing right now (user_editing). Only when the user explicitly asked for this very edit in their current request — never as a retry for user_editing on your own. The edit still merges with their typing (nothing of theirs is lost); the result names them in overrode, and the commit says so. | |
| message | No | Commit message stating the intent of this change, imperative ("Tighten the abstract"), at most 200 characters. It titles the commit in the History panel; every call is one commit. | |
| project | No | Project id. Optional when the access token is scoped to exactly one project. | |
| comment_id | Yes | The thread, as list_comments names it. |