T3.PullRequests (T3 v0.3.0)

Copy Markdown View Source

PullRequests MCP operations. Pass T3's original string-keyed argument maps.

Tool availability depends on the authenticated server, permission mode and invocation context. In-app agent tools may not be available to outside clients. See T3.Catalog.tools(:pull_requests) for descriptions and context requirements.

Summary

Functions

Link a PR to this thread. T3 shows its status and settles the thread on merge.

Link several pull requests to a thread in one call. Invalid pull request URLs are returned separately.

List PRs linked to a thread, with last known state and stack order (bottom to top). Call only when you need that list. Never as an end-of-work check.

Read a PR's stored review guide and run state. guide is null when none exists. Never starts a run.

Remove a PR link from this thread. Succeeds with wasLinked=false when it was not linked.

Unlink every pull request on a thread whose last known state is in the supplied states.

Stop watching a PR for this thread. It stays linked.

Watch an open PR for this thread, linking it first if needed. T3 wakes you on failed checks, passed required checks, new comments or reviews, or conflicts. Handle old comments first. Only later ones wake you. After this call, end your turn. The watch stays on after each wake, so do not call this again on a wake. A wake is not a merge decision. Check readiness yourself.

Write review guides for up to 20 PRs (the tour in the PR Guide tab). Returns once runs start. Each run takes minutes in a temporary checkout. A run for the same head is joined. Read with read_pull_request_guide. Fails while guides are off.

Functions

link(client, arguments \\ %{})

@spec link(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

Link a PR to this thread. T3 shows its status and settles the thread on merge.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

list(client, arguments \\ %{})

@spec list(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

List PRs linked to a thread, with last known state and stack order (bottom to top). Call only when you need that list. Never as an end-of-work check.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

read_guide(client, arguments \\ %{})

@spec read_guide(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

Read a PR's stored review guide and run state. guide is null when none exists. Never starts a run.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

unlink(client, arguments \\ %{})

@spec unlink(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

Remove a PR link from this thread. Succeeds with wasLinked=false when it was not linked.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

unwatch(client, arguments \\ %{})

@spec unwatch(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

Stop watching a PR for this thread. It stays linked.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

watch(client, arguments \\ %{})

@spec watch(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

Watch an open PR for this thread, linking it first if needed. T3 wakes you on failed checks, passed required checks, new comments or reviews, or conflicts. Handle old comments first. Only later ones wake you. After this call, end your turn. The watch stays on after each wake, so do not call this again on a wake. A wake is not a merge decision. Check readiness yourself.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.

write_guides(client, arguments \\ %{})

@spec write_guides(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}

Write review guides for up to 20 PRs (the tour in the PR Guide tab). Returns once runs start. Each run takes minutes in a temporary checkout. A run for the same head is joined. Read with read_pull_request_guide. Fails while guides are off.

Availability is server-, permission-, and context-dependent; outside clients must supply explicit project/thread targets when required.