Skip to main content

Command Palette

Search for a command to run...

API

Origin MCP tool reference

Every tool the Origin MCP server at https://api.origin.cursor.com/mcp lists, in listing order. Parameters are the JSON Schema clients receive from tools/list.

ToolAccessSummary
get_repositoryRead-onlyGet one Origin repository by owner and name, including default branch, mirror state, visibility, and merge settings.
list_repositoriesRead-onlyList Origin repositories belonging to an owner slug.
list_namespacesRead-onlyList the Origin namespaces (owner slugs) the caller can list repositories in, ordered by slug.
create_repositoryWritesCreate an empty Origin-hosted repository.
get_file_contentsRead-onlyRead one path at a ref in an Origin-hosted repository.
get_git_treeRead-onlyList a git tree in an Origin-hosted repository at a tree SHA, commit SHA, branch, tag, or HEAD: immediate children by default, or the full walk with recursive true.
grep_contentsRead-onlySearch file contents across one Origin-hosted repository at a ref, which defaults to the default branch.
list_branchesRead-onlyList branch names and tip commit SHAs for an Origin-hosted repository.
list_commitsRead-onlyList commits from a branch or starting ref in an Origin-hosted repository, optionally filtered by lists of exact git author or committer emails and by inclusive since and until bounds on committer time.
commit_readRead-onlyRead one commit in an Origin-hosted repository.
compare_commitsRead-onlyCompare two refs of an Origin-hosted repository relative to their merge base.
sync_mirrorDestructive, reaches outside OriginSync a mirrored repository from upstream, waiting for a ref or optional SHA.
list_pull_requestsRead-onlyList pull requests in an Origin-hosted repository, filtered by state, head, author, base, or stackId and sorted by creation or update time in either direction.
search_pull_requestsRead-onlySearch pull requests across the Origin-hosted repositories the caller can read, written in GitHub's pull request search syntax.
pull_request_readRead-onlyRead one Origin-hosted pull request through a single view: summary, files, commits, reviews, comments, or threads.
create_pull_requestWritesCreate a pull request from an already-pushed branch.
update_pull_requestWritesUpdate a pull request's title, description, and lifecycle through the public fields.
update_pull_request_baseWritesRetarget a pull request's base branch, stack it on another pull request, or move it off its stack.
merge_pull_requestDestructiveMerge a pull request, or a stack up to and including it.
create_pull_request_reviewWrites content other people seeSubmit a comment, approval, or request-changes review on a pull request.
update_pull_request_reviewWrites content other people seeCorrect the body of an existing pull request review.
dismiss_pull_request_reviewDestructiveDismiss a submitted approve or request-changes review.
create_pull_request_commentWrites content other people seeCreate a general discussion comment on a pull request.
create_pull_request_inline_commentWrites content other people seeCreate a file-level, single-line, or line-range inline comment, optionally against a specific pull request version.
reply_pull_request_review_threadWrites content other people seeReply to an existing review thread by thread ID.
update_pull_request_review_threadWrites content other people seeResolve or reopen a review thread by thread ID.
update_pull_request_commentWrites content other people seeCorrect an existing pull request comment body.
update_pull_request_labelsWritesReplace every label on a pull request with the provided names.
create_labelWritesCreate a repository label so update_pull_request_labels can apply it.
request_pull_request_reviewersWrites content other people seeRequest reviewers (users and/or groups) on a pull request.
remove_pull_request_reviewersWrites content other people seeRemove requested reviewers from a pull request.
checks_readRead-onlyRead checks for one target in an Origin-hosted repository: a pull request, commit, suite, or run.
list_rulesetsRead-onlyList the rulesets on an Origin-hosted repository as summaries: id, name, kind, enforcement, included and excluded ref name patterns, the rule types present, and the bypass actor count.
get_rulesetRead-onlyRead one ruleset on an Origin-hosted repository by its id from list_rulesets: name, description, kind, enforcement, included and excluded ref name patterns, each rule as its ruleType and JSON parameters, and each bypass actor as its kind (user, team, app, or origin_role), identifiers, and bypassMode.
get_repository_accessRead-onlyRead who can access an Origin-hosted repository.

get_repository

Get one Origin repository by owner and name, including default branch, mirror state, visibility, and merge settings.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:metadata:read

get_repository parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace

get_repository returns

id, owner, name, fullName, defaultBranch, cloneUrl, mirror, visibility, allowMergeCommit, allowSquashMerge, deleteBranchOnMerge

list_repositories

List Origin repositories belonging to an owner slug.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: namespace:repositories:read

list_repositories parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
pageSizenumberNo
pageTokenstringNo
filterstringNoCase-insensitive repository name substring

list_repositories limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.

list_repositories returns

repositories (paged), nextPageToken

list_namespaces

List the Origin namespaces (owner slugs) the caller can list repositories in, ordered by slug. Each slug is a valid owner for list_repositories; viewerCanCreateRepositories reports whether creating a repository there would be allowed. An empty list means the caller has no Origin repositories to read; repositories on GitHub or other hosts are not reachable through these tools.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: namespace:repositories:read

list_namespaces parameters

NameTypeRequiredDescription
pageSizenumberNo
pageTokenstringNo

list_namespaces limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.

list_namespaces returns

namespaces (paged), nextPageToken

create_repository

Create an empty Origin-hosted repository. Pick an owner from list_namespaces where viewerCanCreateRepositories is true; omit owner to use the caller's personal namespace, which Origin claims on first use (needs an eligible plan, a Privacy Mode that allows code storage, and no team membership; team members pass their team slug). Both steps are one approval: confirm with the user before calling. defaultBranch defaults to main. Repository names are unique per owner, so retrying after a success fails with a conflict; read the repository with get_repository instead. Returns the created repository, including cloneUrl.

  • Access: Writes
  • Asks for confirmation: Yes
  • On the read-only endpoint: No
  • Required scopes: namespace:repositories:create

create_repository parameters

NameTypeRequiredDescription
ownerstringNoOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
defaultBranchstringNoDefault branch name. Omit for main.

create_repository returns

id, owner, name, fullName, defaultBranch, cloneUrl, visibility, allowMergeCommit, allowSquashMerge, deleteBranchOnMerge

get_file_contents

Read one path at a ref in an Origin-hosted repository. Files larger than the byte cap are truncated. A directory returns type dir and its immediate children as entries (name, path, type, sha, and size for files) instead of content; entries past the cap are dropped and truncated is set.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

get_file_contents parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
pathstringYes
refstringNo
startLinenumberNo
endLinenumberNo

get_file_contents limits

  • content is truncated after 256 KiB.
  • A line range covers at most 500 lines.

get_file_contents returns

files (at most 1), path, content, encoding, sha, truncated, type, entries (at most 1000), name, size

get_git_tree

List a git tree in an Origin-hosted repository at a tree SHA, commit SHA, branch, tag, or HEAD: immediate children by default, or the full walk with recursive true. Each entry is path, mode, type (blob, tree, or commit), sha, and size for blobs. Entries past the cap are dropped and truncated is set; list subtrees non-recursively to see more. get_file_contents reads one blob.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

get_git_tree parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
shastringYesTree SHA, commit SHA, branch, tag, or HEAD
recursivebooleanNoTrue walks the whole tree; omit for immediate children only

get_git_tree returns

sha, entries (at most 1000), path, mode, type, size, truncated

grep_contents

Search file contents across one Origin-hosted repository at a ref, which defaults to the default branch. The query is a regular expression matched case-sensitively; set literal for exact text, or caseInsensitive to ignore case (regex mode prefixes (?i) for GrepContents). wholeWord applies only with literal; for regex use \b. Returns matching lines plus any requested context lines, capped at 1000 matching occurrences, and sets limitHit when that cap is reached. Each returned line contains its full text, so the occurrence cap does not bound response bytes. There is no pagination. Narrow query, filterPath, includes, or excludes to reach other matches.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

grep_contents parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
querystringYesRegular expression matched case-sensitively by default. Set literal for exact text, or caseInsensitive to ignore case (regex mode prefixes (?i)). wholeWord applies only with literal; for regex use \b.
refstringNoBranch, tag, or commit to search
literalbooleanNoMatch query as exact text
caseInsensitivebooleanNoIgnore case when matching; regex mode prefixes the query with (?i) for GrepContents, and that prefix counts toward the query UTF-8 cap
wholeWordbooleanNoMatch whole words only; only applied when literal is true. For regex, use \b instead.
contextBeforenumberNoContext lines before each match, at most 10
contextAfternumberNoContext lines after each match, at most 10
filterPathstringNoFile or directory to search, relative to the repo root
includesstring[]NoGlobs naming the only paths to search
excludesstring[]NoGlobs naming paths to leave out; an exclude beats an include
maxResultsnumberNoMatching occurrences to return, at most 1000. Zero uses the default of 1000

grep_contents limits

  • query must be set.
  • query is at most 4 KiB of UTF-8.
  • filterPath is at most 4 KiB of UTF-8.
  • includes takes at most 20 items.
  • excludes takes at most 20 items.
  • includes is at most 4 KiB of UTF-8.
  • excludes is at most 4 KiB of UTF-8.
  • maxResults is clamped to at most 1000.
  • contextBefore is clamped to at most 10.
  • contextAfter is clamped to at most 10.

grep_contents returns

matches (at most 21000), path, lineNumber, line, kind, submatches (at most 1000), limitHit

list_branches

List branch names and tip commit SHAs for an Origin-hosted repository. Optional prefix filters each page after pagination.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

list_branches parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
pageSizenumberNo
pageTokenstringNo
prefixstringNoCase-sensitive branch name prefix. Applied per page after pagination; keep following nextPageToken even when a page has no matches.

list_branches limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.

list_branches returns

branches (paged), nextPageToken

list_commits

List commits from a branch or starting ref in an Origin-hosted repository, optionally filtered by lists of exact git author or committer emails and by inclusive since and until bounds on committer time. A commit matches a list when its email equals any listed email, and must match every list and bound that is given. Email and time filters share one scan of at most 1000 commits per page, so a filtered page can be short or empty while nextPageToken is present. Keep paging to reach older matches. Each item is sha, full message, author, committer, parents, and tree. Omits patches. Continuation calls reuse the filters stored in pageToken.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

list_commits parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
refstringNoBranch or starting commit
authorEmailsstring[]NoOnly commits whose git author email equals any listed email, case-insensitive. Not names or partial matches. At most 100 distinct emails.
committerEmailsstring[]NoOnly commits whose git committer email equals any listed email, case-insensitive. At most 100 distinct emails. Combined with authorEmails, a commit must match both lists.
sincestringNoOnly commits whose git committer time is at or after this RFC 3339 timestamp, such as 2026-08-01T00:00:00Z. The bound is inclusive and uses committer time, which a rebase or cherry-pick rewrites, not author time.
untilstringNoOnly commits whose git committer time is at or before this RFC 3339 timestamp, such as 2026-08-31T23:59:59Z. The bound is inclusive. Combined with since and the email filters, a commit must match every filter that is set.
pageSizenumberNo
pageTokenstringNo

list_commits limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.
  • authorEmails takes at most 100 items.
  • committerEmails takes at most 100 items.

list_commits returns

commits (paged), nextPageToken

commit_read

Read one commit in an Origin-hosted repository. Choose a single view: metadata, files, or a bounded patch.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

commit_read parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
shastringYes
viewstringYes
pageSizenumberNo
pageTokenstringNo
startLinenumberNo
endLinenumberNo

commit_read limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.
  • view is one of metadata, files, patch.
  • Long patch output is returned in chunks.
  • A line range covers at most 500 lines.

commit_read returns

Set view to choose what comes back:

  • metadata: sha, message, author, committer, stats, parents
  • files: files (paged), path, status, additions, deletions, changes, previousFilename
  • patch: patch (chunked), truncated

compare_commits

Compare two refs of an Origin-hosted repository relative to their merge base.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:contents:read

compare_commits parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
basestringYesRef the comparison starts from
headstringYesRef compared against the base

compare_commits returns

mergeBase, aheadBy, behindBy, status

sync_mirror

Sync a mirrored repository from upstream, waiting for a ref or optional SHA. Returns completed or pending.

  • Access: Destructive, reaches outside Origin
  • Asks for confirmation: Yes
  • On the read-only endpoint: No
  • Required scopes: repository:mirror:sync

sync_mirror parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
refstringYesFull ref to fetch, such as refs/heads/main
shastringNoFull commit id to wait for; omit to wait on the ref tip

sync_mirror returns

status: one of completed, pending.

list_pull_requests

List pull requests in an Origin-hosted repository, filtered by state, head, author, base, or stackId and sorted by creation or update time in either direction. Items are compact summaries (author, timestamps, merged/closedAt/mergedAt, and stack membership when the pull request is stacked); they omit body and diff stats—use pull_request_read for those. With stackId, the items are that stack's members in the requested sort order, not stack order; rebuild the tree from each member's stack.parent, and pass state all because the default open state leaves merged members out. Continuation calls must resend those filters with pageToken.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:pull_requests:read

list_pull_requests parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
statestringNoopen (default), closed, or all
headstringNoHead branch
authorstringNoActor id (user_…, app_…, or sa_…)
basestringNoBase branch, short name or refs/heads/…
stackIdstringNoStack id (stk_…) from stack.id on a pull request. Lists only that stack's members, in the requested sort order rather than stack order; rebuild the tree from each member's stack.parent. Pass state all to include merged members.
directionstringNodesc (default) or asc
sortBystringNocreated (default) or updated
pageSizenumberNo
pageTokenstringNo

list_pull_requests limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.
  • state is one of open, closed, all.
  • direction is one of desc, asc.
  • sortBy is one of created, updated.

list_pull_requests returns

pullRequests (paged), nextPageToken

search_pull_requests

Search pull requests across the Origin-hosted repositories the caller can read, written in GitHub's pull request search syntax. A query combines qualifiers (is:open, is:merged, is:draft, author:, review-requested:, reviewed-by:, label:, base:, head:, and created:, updated:, merged: or closed: with a date or range), bare words and quoted phrases matched against text, the operators AND, OR and NOT (or a leading -), parentheses, and one sort: such as sort:updated-desc. repo:owner/name, org: or user: choose the repositories searched; otherwise owner and name choose one. A search reads one namespace (one org or user) at a time: a query whose repo:, org: and user: name more than one is refused, and so is one that names none without owner and name, so add org:NAME. A session limited to specific repositories, such as a cloud agent's, searches only those repositories; if a search is refused for not naming them, name them with repo:owner/name or with owner and name. Results come from a search index and are eventually consistent: a pull request created or changed moments ago can be missing or stale, so read your own writes with list_pull_requests or pull_request_read. Items are the compact list_pull_requests summaries plus each pull request's repository, without stack.parent. totalCount is exact unless totalCountIsLowerBound is set. A query Origin cannot answer fails with its problems, each with its query[start:end] span when it has one: every qualifier the parser rejects before it stops is named, along with at most one conflict across the whole search such as a second sort:, and a malformed query (such as one with an unclosed quote) names only how it is written. A query that parses is then checked in stages, and only the first stage that finds a problem is named: a second namespace, then a person Origin does not know, then a qualifier that search cannot answer, such as is:queued. Continuation calls must resend the same query, owner and name with pageToken. Examples: org:acme is:open review-requested:@me, or repo:acme/web is:merged merged:>=2026-09-01.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:pull_requests:read, repository:pull_requests:reviews:read

search_pull_requests parameters

NameTypeRequiredDescription
querystringYesGitHub pull request search query, at most 1024 characters, such as org:acme is:open review-requested:@me
ownerstringNoOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringNoOrigin repository name within that namespace
pageSizenumberNo
pageTokenstringNo

search_pull_requests limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.
  • query must be set.
  • query is at most 1024 characters.

search_pull_requests returns

pullRequests (paged), totalCount, totalCountIsLowerBound, nextPageToken

pull_request_read

Read one Origin-hosted pull request through a single view: summary, files, commits, reviews, comments, or threads. Summary includes labels, requested reviewers, and stack membership (stack id and parent pull request) when the pull request is stacked. The threads view requires threadIds and pages comments in those threads. Comments and threads carry url, a cursor.com link to that thread or comment on the pull request page.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:pull_requests:read, repository:pull_requests:reviews:read

pull_request_read parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
viewstringYes
pageSizenumberNo
pageTokenstringNo
startLinenumberNo
endLinenumberNo
threadIdsstring[]NoThread ids for the threads view

pull_request_read limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.
  • view is one of summary, files, commits, reviews, comments, stack, threads.
  • threadIds takes at most 20 items.
  • Long patch output is returned in chunks.
  • A line range covers at most 500 lines.

pull_request_read returns

Set view to choose what comes back:

  • summary: number, title, state, draft, merged, author, base, head, createdAt, updatedAt, closedAt, mergedAt, body, additions, deletions, changedFiles, stack, labels (at most 100), requestedReviewers (at most 100)
  • files: files (paged), path, status, additions, deletions, changes, patch (chunked), truncated
  • commits: commits (paged)
  • reviews: reviews (paged), id, body, verdict, author, submittedAt
  • comments: comments (paged), id, body, threadId, author, createdAt, updatedAt, url
  • stack (not yet public): parent, children (paged), mergePrefix, convergence
  • threads: threads (paged)

create_pull_request

Create a pull request from an already-pushed branch. To stack it, pass parentPullNumber: the base becomes that pull request's head branch (any other base is rejected), and head must have been built on that branch, meaning the two share a commit beyond the parent's own base. A head built off trunk or from unrelated history is rejected with the rebase to run. A head that has since fallen behind the parent is accepted and the response carries needsRestack, because the pull request cannot land until it is restacked; this tool never restacks. stackParent is the stored parent's number, read back after the create.

  • Access: Writes
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:write

create_pull_request parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
titlestringYes
headstringYesAlready-pushed source branch
basestringNoTarget branch the pull request merges into. Required without parentPullNumber; with it, omit this or name the parent's head branch.
bodystringNo
draftbooleanNo
parentPullNumbernumberNoPull request to stack on, by number. Its head branch becomes the base, and head must have been built on that branch.

create_pull_request returns

number, title, state, draft, head, base, stackParent, needsRestack

update_pull_request

Update a pull request's title, description, and lifecycle through the public fields. Omit title or body to leave that field unchanged; pass an empty body to clear the description. Lifecycle is state (open or closed) plus draft, sent independently: state closed closes and ignores draft; state open reopens, and without draft true marks ready and publishes an existing draft; draft true reopens as a draft, alone or together with state open; draft false marks ready and reopens a closed pull request. Send one lifecycle field, both, or neither, so a metadata-only update is valid. Metadata and lifecycle together send one public UpdatePullRequest. Origin applies present fields in its documented order; a failure can leave some fields applied, so re-read after an error. merged is not writable, and ready is draft false or state open rather than a state value.

  • Access: Writes
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:write

update_pull_request parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
titlestringNoNew title. Omit to leave unchanged.
bodystringNoNew description. Omit to leave unchanged. Pass "" to clear.
state"open" | "closed"Noopen or closed. Omit to leave unchanged.
draftbooleanNoDraft flag. Omit to leave unchanged.

update_pull_request limits

  • state is one of open, closed.

update_pull_request returns

number, title, body, state, draft

update_pull_request_base

Retarget a pull request's base branch, stack it on another pull request, or move it off its stack. With parentPullNumber, the base becomes that pull request's head branch and the stack parent is set in the same update. With base, the pull request is retargeted to that branch: the head branch of an open pull request makes that pull request the parent, and the default branch or a branch with no open pull request moves it off its stack. Stacking is allowed only when this pull request's branch was built on the parent, meaning the two share a commit beyond the parent's own base; a branch built off trunk or from unrelated history is rejected with the rebase to run. A branch that has fallen behind the parent is accepted and the response carries needsRestack, because the pull request cannot land until it is restacked. This tool stacks and unstacks but never restacks: no commit is rebased or replayed. Returns the stored base and head refs, plus stackParent when stacked.

  • Access: Writes
  • Asks for confirmation: Yes
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:write

update_pull_request_base parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
basestringNoBranch to retarget onto. The default branch or a branch with no open pull request unstacks; the head branch of an open pull request stacks on it. Send this or parentPullNumber.
parentPullNumbernumberNoPull request to stack on, by number. Its head branch becomes the base. Send this or base.

update_pull_request_base returns

number, base, head, stackParent, needsRestack

merge_pull_request

Merge a pull request, or a stack up to and including it. On a stacked pull request this lands every open pull request from the stack root through this one in one commit (one squash commit with squash, one merge commit otherwise); Origin checks every member first and lands nothing if one is blocked. Where a merge queue owns the branch, a single pull request is queued instead, and nothing lands yet. If Origin queues a stack as one merge queue entry instead, its members land in one commit or none do. When the call queues, mergeCommitSha and mergedPrefix are empty, because nothing has landed yet. To land a stack one pull request at a time, merge the lowest open one each time; each becomes its own commit, and the ones above usually need a restack after each landing. Requires the expected head SHA of this pull request. Optional mergeMethod (merge or squash); omit it and Origin picks a method the repository accepts. mergedPrefix lists every pull request that landed. Pull requests above the target stay open; skippedDescendants is currently always empty.

  • Access: Destructive
  • Asks for confirmation: Yes
  • On the read-only endpoint: No
  • Required scopes: repository:contents:write

merge_pull_request parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
expectedHeadShastringYes
mergeMethod"merge" | "squash"Nomerge or squash. Omit for the repository default.

merge_pull_request limits

  • expectedHeadSha must be set.
  • mergeMethod is one of merge, squash.

merge_pull_request returns

mergeCommitSha, mergedPrefix (at most 200), skippedDescendants (at most 100)

create_pull_request_review

Submit a comment, approval, or request-changes review on a pull request. Inline review comments are unsupported.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

create_pull_request_review parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
eventstringYesCOMMENT, APPROVE, or REQUEST_CHANGES
bodystringNo

create_pull_request_review limits

  • event is one of COMMENT, APPROVE, REQUEST_CHANGES.

create_pull_request_review returns

id, state, body

update_pull_request_review

Correct the body of an existing pull request review.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

update_pull_request_review parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
reviewIdstringYes
bodystringYes

update_pull_request_review returns

id, state, body

dismiss_pull_request_review

Dismiss a submitted approve or request-changes review.

  • Access: Destructive
  • Asks for confirmation: Yes
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

dismiss_pull_request_review parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
reviewIdstringYes
messagestringYesReason recorded with the dismissal

dismiss_pull_request_review returns

id, state, dismissal

create_pull_request_comment

Create a general discussion comment on a pull request.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

create_pull_request_comment parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
bodystringYes

create_pull_request_comment returns

id, body

create_pull_request_inline_comment

Create a file-level, single-line, or line-range inline comment, optionally against a specific pull request version.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

create_pull_request_inline_comment parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
bodystringYes
anchorobjectYes
anchor.kindstringYesfile, line, or range
anchor.pathstringYesDiff path. Deleted path for deletions; head path otherwise
anchor.sidestringNoleft or right. Required for line and range; omit for file
anchor.startLinenumberNo1-based first line. Required for line and range
anchor.endLinenumberNoInclusive last line. Required for range; omit otherwise
versionNumbernumberNoPull request version. Omit or 0 for latest

create_pull_request_inline_comment limits

  • A line range covers at most 500 lines.

create_pull_request_inline_comment returns

threadId, id, path, line, body

reply_pull_request_review_thread

Reply to an existing review thread by thread ID.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

reply_pull_request_review_thread parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
threadIdstringYesThread to reply to, from threadId on pull_request_read comments
bodystringYes

reply_pull_request_review_thread limits

  • threadId must be set.

reply_pull_request_review_thread returns

id, threadId, body, createdAt, updatedAt

update_pull_request_review_thread

Resolve or reopen a review thread by thread ID.

  • Access: Writes content other people see
  • Asks for confirmation: Yes
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

update_pull_request_review_thread parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
threadIdstringYesThread to resolve or reopen, from threadId on pull_request_read comments
resolvedbooleanYesTrue resolves the thread; false reopens it

update_pull_request_review_thread limits

  • threadId must be set.

update_pull_request_review_thread returns

threadId, resolved

update_pull_request_comment

Correct an existing pull request comment body.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

update_pull_request_comment parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
commentIdstringYesStable comment id from pull_request_read with view comments
bodystringYes

update_pull_request_comment returns

id, body, threadId, createdAt, updatedAt

update_pull_request_labels

Replace every label on a pull request with the provided names. Each name must be an existing repository label, spelled exactly, including case; this tool never creates labels. For a label that does not exist yet, call create_label first, then call this tool. Omitted labels are removed. An empty list removes all labels.

  • Access: Writes
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:write

update_pull_request_labels parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
labelsstring[]YesComplete replacement label names. Omitted names are removed. An empty list removes all labels.

update_pull_request_labels limits

  • labels takes at most 100 items.

update_pull_request_labels returns

labels (at most 100)

create_label

Create a repository label so update_pull_request_labels can apply it. label is the name: 1-50 characters, trimmed, and unique in the repository by exact, case-sensitive spelling, so Bug and bug are different labels; reuse an existing label that differs only in case instead of creating another. color is six hex digits with an optional leading #, such as d73a4a; it defaults to ededed. description is optional, at most 255 characters. A name that already exists returns a conflict; apply that label instead.

  • Access: Writes
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:labels:write

create_label parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
labelstringYesLabel name to create, 1-50 characters
colorstringNoSix hex digits, optional leading #; defaults to ededed
descriptionstringNoLabel description, at most 255 characters

create_label limits

  • label must be set.

create_label returns

name, color, description

request_pull_request_reviewers

Request reviewers (users and/or groups) on a pull request.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

request_pull_request_reviewers parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
usersstring[]NoUser identifiers: public user_… id or email
groupsstring[]NoGroup identifiers: public grp_… id, qualified slug, or slug

request_pull_request_reviewers limits

  • users takes at most 100 items.
  • groups takes at most 100 items.

request_pull_request_reviewers returns

users (at most 100), groups (at most 100)

remove_pull_request_reviewers

Remove requested reviewers from a pull request.

  • Access: Writes content other people see
  • Asks for confirmation: No
  • On the read-only endpoint: No
  • Required scopes: repository:pull_requests:reviews:write

remove_pull_request_reviewers parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
numbernumberYes
usersstring[]NoUser identifiers: public user_… id or email
groupsstring[]NoGroup identifiers: public grp_… id, qualified slug, or slug

remove_pull_request_reviewers limits

  • users takes at most 100 items.
  • groups takes at most 100 items.

remove_pull_request_reviewers returns

status: one of completed.

checks_read

Read checks for one target in an Origin-hosted repository: a pull request, commit, suite, or run. Rollup covers materialized check runs on the current page only and is omitted when nextPageToken is present. Does not fetch external provider logs.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:checks:read, repository:pull_requests:read

checks_read parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
targetobjectYes
target.typestringYes
target.numbernumberNo
target.shastringNo
target.checkSuiteIdstringNo
target.checkRunIdstringNo
pageSizenumberNo
pageTokenstringNo

checks_read limits

  • pageSize defaults to 30 and is at most 100.
  • Pass the previous response's nextPageToken as pageToken to read the next page.
  • target.type is one of pull_request, commit, suite, run.

checks_read returns

rollupStatus, failing (paged), suites (paged), runs (paged), nextPageToken

list_rulesets

List the rulesets on an Origin-hosted repository as summaries: id, name, kind, enforcement, included and excluded ref name patterns, the rule types present, and the bypass actor count. Rulesets past the cap are dropped and truncated is set. get_ruleset reads one ruleset in full.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:rulesets:read

list_rulesets parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace

list_rulesets returns

rulesets (at most 100), id, name, kind, enforcement, includedRefNames (at most 64), excludedRefNames (at most 64), ruleTypes (at most 20), bypassActorCount, truncated

get_ruleset

Read one ruleset on an Origin-hosted repository by its id from list_rulesets: name, description, kind, enforcement, included and excluded ref name patterns, each rule as its ruleType and JSON parameters, and each bypass actor as its kind (user, team, app, or origin_role), identifiers, and bypassMode.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:rulesets:read

get_ruleset parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace
rulesetIdstringYesRuleset id from list_rulesets

get_ruleset returns

id, name, description, kind, enforcement, includedRefNames (at most 64), excludedRefNames (at most 64), rules (at most 20), ruleType, parameters, bypassActors (at most 15), bypassMode, organizationPublicId, groupPublicId, role

get_repository_access

Read who can access an Origin-hosted repository. teamAdmins and teamMembers are the team floor. grants has one row per user or group principal with its kind, id, display name (omitted for a user with no name), and policy names: namespacePolicy is the inherited floor, repoPolicy the repository override, and effectivePolicy the broader of the two. A layer with no grant is omitted. Grants past the cap are dropped and truncated is set.

  • Access: Read-only
  • Asks for confirmation: No
  • On the read-only endpoint: Yes
  • Required scopes: repository:settings:read

get_repository_access parameters

NameTypeRequiredDescription
ownerstringYesOrigin namespace (owner) slug, taken from list_namespaces or an earlier Origin result. A GitHub owner or org name is not an Origin namespace unless list_namespaces returns it.
namestringYesOrigin repository name within that namespace

get_repository_access returns

teamAdmins, teamMembers, grants (at most 100), kind, id, display, namespacePolicy, repoPolicy, effectivePolicy, truncated