update_file
Update an existing file in a Codeup repository with new content and a commit message, targeting a specific branch.
Instructions
[Code Management] Update an existing file in a Codeup repository
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": {
"organizationId": "<organizationId>",
"repositoryId": "<repositoryId>",
"filePath": "<filePath>",
"content": "<content>",
"commitMessage": "<commitMessage>",
"branch": "<branch>"
},
"name": "update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | Branch name | |
| content | Yes | File content | |
| encoding | No | Encoding rule, options {text, base64}, default is text | text |
| filePath | Yes | File path, needs to be URL encoded, for example: /src/main/java/com/aliyun/test.java | |
| repositoryId | Yes | Repository ID, or org/repo path with slashes URL-encoded as %2F. e.g. 2835387 or myorg%2Fmyrepo | |
| commitMessage | Yes | Commit message, not empty, no more than 102400 characters | |
| organizationId | Yes | Organization ID |