# list\_forge\_pull\_requests

List a repository's pull requests from its forge: every one from a branch, or the open ones.

read-only · idempotent · MCP tool · [Forge](https://komrad.dev/latest/api/forge.md)

[`list_pull_requests`](https://komrad.dev/latest/api/pull-request/list-pull-requests.md) lists the ones komrad has recorded instead.

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.forge.v1.ForgeService/ListForgePullRequests \
  -H 'Content-Type: application/json' \
  -d '{
  "remote_url": "<remote_url>"
}'
```

```bash
komrad rpc list-forge-pull-requests \
  --remote-url '<string>'
```

```json
{
  "name": "list_forge_pull_requests",
  "arguments": {
    "remote_url": "<remote_url>"
  }
}
```

Offered by the komrad MCP server to orchestrator agents.

## Request

### ListForgePullRequestsRequest

| Field | Type | Description |
| --- | --- | --- |
| [`remote_url`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ListForgePullRequestsRequest-remote_url) | string\* at most 2048 characters | The repository's git remote, such as `git@github.com:owner/repo.git` or `https://github.com/owner/repo`. The remote's host picks the forge connection. |
| [`branch`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ListForgePullRequestsRequest-branch) | string at most 512 characters | The branch whose pull requests to list, in any state. Empty lists the repository's open pull requests. |
| [`pagination`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ListForgePullRequestsRequest-pagination) | [Pagination](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-pagination-v1-Pagination) | The page to read. The page size defaults to twenty and is at most a hundred. |

## Response

### ListForgePullRequestsResponse

| Field | Type | Description |
| --- | --- | --- |
| [`pull_requests`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ListForgePullRequestsResponse-pull_requests) | [ForgePullRequest\[\]](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest) | One page of pull requests, in the forge's order. |
| [`next_page_token`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ListForgePullRequestsResponse-next_page_token) | string | The cursor for the next page. Unset on the last page. |

## Types

### Pagination

Pagination selects one page of a listing.

| Field | Type | Description |
| --- | --- | --- |
| [`limit`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-pagination-v1-Pagination-limit) | int32 at least 0 | How many records to return. Komrad caps the value, and picks one when unset. |
| [`cursor`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-pagination-v1-Pagination-cursor) | string at most 2048 characters | The `next_page_token` from the previous response. Unset to start from the first page. |

### ForgePullRequest

ForgePullRequest is a pull request as the forge describes it, read live and not kept.

| Field | Type | Description |
| --- | --- | --- |
| [`forge`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-forge) | [Kind](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-Kind) | The kind of forge the pull request is on. |
| [`provider_id`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-provider_id) | string | The forge's own stable id for the pull request, such as GitHub's `node_id`. |
| [`url`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-url) | string | The pull request's web address. |
| [`repository_url`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-repository_url) | string | The web address of the repository the pull request merges into. |
| [`head_repository_url`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-head_repository_url) | string | The web address of the repository the pull request's branch is in. Empty when the forge no longer has that repository. |
| [`number`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-number) | int32 | The pull request's number, unique within its repository. |
| [`title`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-title) | string | The pull request's title. |
| [`head_branch`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-head_branch) | string | The branch the pull request merges from. |
| [`head_sha`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-head_sha) | string | The commit at the tip of the pull request's branch. |
| [`base_branch`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-base_branch) | string | The branch the pull request merges into. |
| [`base_sha`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-base_sha) | string | The commit at the tip of the branch the pull request merges into. |
| [`draft`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-draft) | bool | Whether the pull request is a draft. |
| [`state`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-state) | string | The state the forge reports, `OPEN`, `CLOSED` or `MERGED`. |
| [`created_at`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-created_at) | timestamp | When the pull request was opened. |
| [`updated_at`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-updated_at) | timestamp | When the pull request last changed on the forge. |
| [`merged_at`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-merged_at) | timestamp | When the pull request merged. Unset until the pull request merges. |
| [`closed_at`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-ForgePullRequest-closed_at) | timestamp | When the pull request closed, merged or not. Unset while the pull request is open. |

### Kind

Kind is the kind of forge a host runs.

| Value | Description |
| --- | --- |
| [`github`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-Kind-github) | GitHub, or a GitHub Enterprise host. |
| [`gitlab`](https://komrad.dev/latest/api/forge/list-forge-pull-requests.md#komrad-forge-v1-Kind-gitlab) | GitLab, or a self-managed GitLab host. |
