Skip to content

get_pull_request

Get detail for a pull request. By default returns compact metadata only (no diff text). Pass include_diff=true to fetch the unified diff, capped at max_bytes (default 32 KB). When truncated, diff_truncated=true is returned along with diff_bytes_returned and diff_bytes_available so callers can decide whether to fetch more via the diff tool with a scoped path.

read-only · idempotent

NameTypeRequiredDefaultDescription
project_nameAnnotated[str, Field(description='Name of the Bridge Town project.')]Yes
pull_request_idAnnotated[int, Field(description='Numeric ID of the pull request within the project.')]Yes
include_diffAnnotated[bool, Field(description='Whether to fetch and return the unified diff. Defaults to false. Set to true to include diff text (capped at max_bytes).')]NoFalse
max_bytesAnnotated[int, Field(description='Maximum bytes of diff text to return when include_diff=true. Defaults to 32768 (32 KB). Clamped to [1024, 524288]. When exceeded, diff_truncated=true is set.')]No_DIFF_DEFAULT_MAX_BYTES
include_financial_deltaAnnotated[bool, Field(description='Whether to compute and attach a financial delta (scenario impact). Defaults to false. When true, runs the project on both PR branches and returns financial_delta and significance in the response. Fails open: compute errors set financial_delta.error without blocking the base response.')]NoFalse

Returns a structured object. Top-level fields:

  • id (integer)
  • project (string)
  • title (string)
  • body (string)
  • head_branch (string)
  • base_branch (string)
  • state (string)
  • author (string)
  • created_at (string)
  • diff (string)

See the response example below for the full payload shape.

{
"name": "get_pull_request",
"arguments": {
"project_name": "forecasts",
"pull_request_id": 42
}
}
{
"id": 42,
"project": "forecasts",
"title": "Aggressive growth scenario",
"body": "Bumps growth_rate from 10% to 15%.",
"head_branch": "scenario/aggressive-growth",
"base_branch": "main",
"state": "open",
"author": "alice@example.com",
"created_at": "2026-04-28T10:00:00+00:00",
"diff": "diff --git a/model/revenue.py b/model/revenue.py\n@@\n-growth_rate = 0.10\n+growth_rate = 0.15\n"
}
  • Module: Pull Requests
  • Requires authentication via API token or Auth0 JWT.