update_pull_request
Update the title/body and/or explicit reviewer assignments of an open pull request. Requires at least Editor role. Pass expected_updated_at from get_pull_request to reject the update if PR metadata changed since it was read, and expected_head_sha to reject it if the head branch received new commits. Stale expected state fails without mutation.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | Annotated[str, Field(description='Name of the Bridge Town model.')] | Yes | — | |
pull_request_id | Annotated[int, Field(description='Numeric ID of the pull request within the model.')] | Yes | — | |
title | `Annotated[str | None, Field(description=‘Replacement PR title. Omit to leave the title unchanged.’)]` | No | None |
body | `Annotated[str | None, Field(description=‘Replacement PR body. Omit to leave the body unchanged.’)]` | No | None |
expected_updated_at | Annotated[str, Field(description='Optional updated_at value observed from get_pull_request. The update fails without mutation if the PR metadata changed since it was read.')] | No | '' | |
expected_head_sha | Annotated[str, Field(description='Optional head_sha observed from get_pull_request. The update fails without mutation if new commits were pushed to the PR branch.')] | No | '' | |
reviewer_user_ids | `Annotated[list[uuid.UUID] | None, Field(description=‘Replace explicit requested reviewers. Pass an empty list to remove all. Requires expected_assignment_version from get_pull_request.’, max_length=20)]` | No | None |
expected_assignment_version | `Annotated[int | None, Field(ge=0, description=‘Current reviewer_assignment_version from get_pull_request; required when reviewer_user_ids is provided.’)]` | No | None |
workspace_id | `Annotated[str | None, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
model(string)pull_request_id(integer)title(string)body(string)state(string)merged(boolean)changed(boolean)message(string)requested_reviewers(array<object>)reviewer_assignment_version(integer)viewer_has_outstanding_request(boolean)viewer_approval_required(boolean)workspace_id(string)actor(object)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "update_pull_request", "arguments": { "model_name": "forecasts", "pull_request_id": 42, "title": "Aggressive growth scenario — revised", "body": "Bumps growth_rate from 10% to 15% and documents downside sensitivity.", "expected_updated_at": "2026-04-28T10:00:00+00:00", "expected_head_sha": "def456abc123", "reviewer_user_ids": [ "22222222-2222-2222-2222-222222222222" ], "expected_assignment_version": 0 }}Response
Section titled “Response”{ "model": "forecasts", "pull_request_id": 42, "title": "Aggressive growth scenario — revised", "body": "Bumps growth_rate from 10% to 15% and documents downside sensitivity.", "state": "open", "merged": false, "changed": true, "message": "Pull request #42 updated.", "requested_reviewers": [ { "reviewer_user_id": "22222222-2222-2222-2222-222222222222", "display_name": "Bob", "state": "requested", "review_submitted_at": null } ], "reviewer_assignment_version": 1, "viewer_has_outstanding_request": false, "viewer_approval_required": false, "workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd", "actor": { "kind": "human", "display_name": "Alice" }}- Module:
Pull Requests - Requires an authenticated Bridge Town session (OAuth) or an API token.
- When
reviewer_user_idsis supplied, the same request must carry the currentexpected_assignment_version; an empty list removes every assignment. - Only active model editors and owners may be assigned, and stale versions fail without changing the assignment set.