update_file
Replace an existing file in a Forgejo repository by supplying its path, new content, commit message, and current blob SHA. Ensures the commit targets the latest version.
Instructions
Update an existing file. sha is the current file blob SHA.
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": {
"owner": "<owner>",
"repo": "<repo>",
"filepath": "<filepath>",
"content": "<content>",
"message": "<message>"
},
"name": "update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | No | ||
| repo | Yes | ||
| owner | Yes | ||
| base64 | No | ||
| branch | No | ||
| content | Yes | ||
| message | Yes | ||
| filepath | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||