Skip to content

update_pr

Update a pull request's title, body, labels, or assignees through Polygraph.

Collection mode 'set' replaces every value and accepts an empty list to clear the collection. Modes 'add' and 'remove' require at least one nonblank value and preserve unrelated values. Omitted fields remain unchanged. Provide at least one metadata field.

NameTypeRequiredDescription
sessionIdstringyesThe Polygraph session ID, or a supported Polygraph app session URL. Supported URL paths are /s/<session-id> and /orgs/<org-id>/sessions/<session-id>. URL inputs are normalized to the session ID; the MCP always uses the current Polygraph API configuration. The pull request must be associated with this session.
prUrlstringyesThe nonblank pull request URL to update.
titlestringnoA nonblank replacement title. Omit it to leave the title unchanged.
bodystringnoA new user-authored pull request body. An empty string clears it. Omit it to leave the body unchanged; Polygraph manages its own footer.
labels{ mode: "set" | "add" | "remove"; values: string[] }noLabel changes. 'set' replaces the complete collection and 'set' with [] clears it. 'add' and 'remove' require at least one nonblank value and preserve unrelated values. Omit labels to leave them unchanged.
assignees{ mode: "set" | "add" | "remove"; values: string[] }noAssignee changes. 'set' replaces the complete collection and 'set' with [] clears it. 'add' and 'remove' require at least one nonblank value and preserve unrelated values. Omit assignees to leave them unchanged.

Returns a result with sessionId, prUrl, outcome, and one operations entry per requested field. outcome is complete, partial, or failed. Every operation includes field, mode, and status. Failed operations also include applied, errorCode, and retryable, and can include mutationEvidence as none, possible, or confirmed. Updated and unchanged operations omit mutationEvidence.