Associate an existing pull request with a Polygraph session.
Use this to link PRs that were created outside of Polygraph (e.g., manually or by CI) to the current session. Provide either a prUrl or a branch name.
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. |
prUrl | string | no | URL of an existing pull request to associate with the session |
branch | string | no | Branch name to find and associate PRs for. Used when prUrl is not provided. In a multi-repo session, requires repo to disambiguate which repository the branch belongs to. |
repo | string | no | Repository full name (owner/repo) or repository id identifying which session repository this PR belongs to. Required when using branch in a multi-repo session. Optional (and ignored) when prUrl is provided, since the repository is parsed from the URL. |
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. |