editFile
Create or update a file by committing content to a branch in a Bitbucket Data Center repository; use sourceCommitId when updating an existing file.
Instructions
Create or update a file (commits it)
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": {
"repoSlug": "<repoSlug>",
"path": "<path>",
"content": "<content>",
"message": "<message>",
"branch": "<branch>"
},
"name": "editFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| branch | Yes | Branch to commit to | |
| content | Yes | New file content | |
| message | Yes | ||
| repoSlug | Yes | ||
| projectKey | No | ||
| sourceCommitId | No | Required to update an existing file |