Create draft pull requests for one or more repositories in a Polygraph session.
Each PR includes session metadata linking it to related PRs across repos. Branches must be pushed first using push_branch.
Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string | yes | The 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. |
prs | array | yes | Array of PR specifications to create. Each PR object has: owner (string, required — GitHub repository owner), repo (string, required — GitHub repository name), title (string, required — PR title), body (string, required — PR description body; session metadata appended automatically), branch (string, required — branch name that was pushed), baseBranch (string, optional — target base branch for the pull request), targetRepository (string, optional — target repo identifier for fork PRs). |
description | string | yes | A session description is required. |
agentSessionId | string | no | The AI agent session ID. Can be used to resume the session later. Resuming is reconnecting to restore context only. After you resume, do not make any changes until the user explicitly asks for changes. |