create_or_update_file
Create or update a file in a GitLab project by providing the project, file path, content, branch, and commit message. Also supports moving or renaming an existing file using the previous path.
Instructions
Create or update a single file in a GitLab project
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_id": "<project_id>",
"file_path": "<file_path>",
"content": "<content>",
"commit_message": "<commit_message>",
"branch": "<branch>"
},
"name": "create_or_update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | Branch to create/update the file in | |
| content | Yes | Content of the file | |
| file_path | Yes | Path where to create/update the file | |
| project_id | Yes | Project ID or URL-encoded path | |
| previous_path | No | Path of the file to move/rename | |
| commit_message | Yes | Commit message |