write_internal_repository
Commit files into an attached internal repository over MCP.
This is the write path for a caller with no shell on this host. Commits land
on the repository's work branch and NEVER on main: main is what
OBS builds and what an ISO installs, and it only moves when you call
publish_internal_repository. Each call adds ONE commit on top of the
current work tip and amends no earlier commit. That commit overwrites
each path in files and removes each path in delete, so send only
the files that change.
base_revision is how you reconcile with a main that moved: pass
'main' to restart work from the published tip, discarding work
commits that were never published, and re-apply these files on top of it.
Pass a SHA to make the write conditional on work still being where you
last saw 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": {
"name": "<name>",
"files": "<files>",
"message": "<message>"
},
"name": "write_internal_repository"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Attached repository id, name, or unambiguous label returned by list_internal_repositories. | |
| files | Yes | Files to write, as [{path, content}] or [{path, content_b64, mode}]. Paths are repository-relative. Binaries and file modes are supported. | |
| delete | No | Repository-relative paths to remove in the same commit. | |
| message | Yes | Commit message. | |
| base_revision | No | Omit to commit on top of the current work tip. Pass 'main' to restart work from the published main and re-apply these files. Pass a commit SHA to require the work tip to be exactly that. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||