Update repository file
update_fileReplace a file in a GitLab repository and commit the change. Provide last_commit_id to prevent overwriting concurrent edits.
Instructions
Replace a repository file and commit the change. Supply last_commit_id to prevent overwriting a concurrent edit.
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": {
"project": "<project>",
"path": "<path>",
"branch": "<branch>",
"content": "<content>",
"commit_message": "<commit_message>",
"last_commit_id": "<last_commit_id>"
},
"name": "update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| branch | Yes | ||
| content | Yes | ||
| project | Yes | GitLab project ID or full path such as group/project. | |
| encoding | No | text | |
| author_name | No | ||
| author_email | No | ||
| start_branch | No | ||
| commit_message | Yes | ||
| last_commit_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | GitLab response normalized for model use. |