Write file
gitlab_create_or_update_fileCreate or update a file in a GitLab branch by providing content, file path, branch, and commit message.
Instructions
Creates or updates a single file in a branch.
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": {
"file_path": "<file_path>",
"branch": "<branch>",
"content": "<content>",
"commit_message": "<commit_message>"
},
"name": "gitlab_create_or_update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Default: update if it exists | |
| branch | Yes | Branch to commit to | |
| content | Yes | Full new file content | |
| file_path | Yes | ||
| project_id | No | Project id or URL-encoded path, e.g. `42` or `group/subgroup/project`. Falls back to GITLAB_PROJECT_ID. | |
| author_name | No | ||
| author_email | No | ||
| start_branch | No | Create `branch` from this branch first | |
| commit_message | Yes |