DESTRUCTIVE

update_repository

Changes a registered repository in part.

Change a repository by repository_id with any of provider, owner, name, url, default_branch, private and component_id. A field left out keeps its value; a field sent as null is cleared. The change goes through the same action the Repositories page runs and repository.updated goes out with what moved. A staff token with repository:update on the project is needed.

Requires ability

The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.

Runs the same action as

The REST endpoint and this tool share one action, so validation, permissions and events are identical.

Fires one event

Delivered to every endpoint subscribed to it once the change is made.

Annotations

Destructive

A client that honours annotations asks a person before running it.

Arguments

repository_id*string

UUID of the repository.

ownerstringoptional

The account or group that owns the repository.

namestringoptional

The repository's name.

providerstringoptional

Where the repository is hosted; github by default.

githubgitlabbitbucket
urlstringoptional

Where it lives when not on the provider's own host.

default_branchstringoptional

The branch releases are cut from; main by default.

privatebooleanoptional

Whether the repository is private; true by default.

component_idstringoptional

UUID of the component it builds; omit when it serves the whole project.

What it returns

{  "data": {    "id": "4c5d6e7f-8a9b-4c0d-8e1f-2a3b4c5d6e7f",    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",    "component_id": "c0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a4b",    "provider": "github",    "owner": "zuse-technologies",    "name": "laundry-web",    "full_name": "zuse-technologies/laundry-web",    "default_branch": "develop",    "url": "https://github.com/zuse-technologies/laundry-web",    "private": true,    "connected_by": null,    "connected_at": null,    "disconnected_at": null,    "created_at": "2026-10-28T09:45:00+00:00",    "updated_at": "2026-10-29T09:00:00+00:00"  }}

How it fails

VALIDATION_FAILED

a field outside its limits, a provider outside the three, a url that is not an address, a component_id that is not the project's, or a repository the project already registered.

RESOURCE_NOT_FOUND

unknown repository_id, or a repository outside the token's scope or the person's visibility.

FORBIDDEN

the token is a client guest's, or the holder's role on the project does not carry repository:update.

TOKEN_MISSING_ABILITY

token lacks repository:update.

How is this guide?

Last updated on