Home/Tools/@tpmjs/tools-github

getPullRequest

@tpmjs/tools-github

Get details of a specific pull request by number.

Official
ops
v0.2.0
MIT
⚠️

This tool is currently broken

Execution Failed
Runtime error with test parameters
Failed to get pull request: Not found: Not Found

Last checked: 3/1/2026, 4:26:17 AM

Interactive Playground

Test @tpmjs/tools-github (getPullRequest) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-github
pnpm add @tpmjs/tools-github
yarn add @tpmjs/tools-github
bun add @tpmjs/tools-github
deno add npm:@tpmjs/tools-github

2. Import the tool

import { getPullRequest } from '@tpmjs/tools-github';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { getPullRequest } from '@tpmjs/tools-github';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { getPullRequest },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(repo: string, owner: string, pull_number: number) => Promise<unknown>

Tags

agent
details
devops
git
github
number
ops
pull
request
specific
tpmjs

Parameters

Available configuration options

Auto-extracted
owner
Required
Type: string

Repository owner.

repo
Required
Type: string

Repository name.

pull_number
Required
Type: number

Pull request number.

Schema extracted: 3/1/2026, 4:26:16 AM

README

@tpmjs/tools-github

GitHub API tools for AI agents. Manage repos, issues, pull requests, commits, branches, releases, gists, and Actions workflows.

Installation

npm install @tpmjs/tools-github

Setup

Set your GitHub personal access token:

export GITHUB_TOKEN="ghp_..."

Usage

import { getRepo, listIssues, searchCode } from '@tpmjs/tools-github';

const repo = await getRepo.execute({ owner: 'vercel', repo: 'next.js' });
const issues = await listIssues.execute({ owner: 'vercel', repo: 'next.js', state: 'open', per_page: 5 });
const results = await searchCode.execute({ q: 'useState language:typescript', per_page: 10 });

Tools

ToolDescription
getRepoGet details of a GitHub repository
listReposList repositories for a user or organization
searchRepositoriesSearch GitHub repositories by query
createIssueCreate a new issue on a repository
getIssueGet details of a specific issue
listIssuesList issues with state and label filters
createIssueCommentAdd a comment to an issue or PR
getPullRequestGet details of a specific pull request
listPullRequestsList pull requests with filters
getFileContentGet file or directory contents from a repo
searchCodeSearch for code across GitHub
listBranchesList branches on a repository
getCommitGet details of a specific commit
listCommitsList commits with path and author filters
listReleasesList releases on a repository
getReleaseGet a specific release by tag name
createGistCreate a new GitHub Gist
listGistsList gists for a user
listWorkflowRunsList GitHub Actions workflow runs
getWorkflowRunGet details of a workflow run

License

MIT

Statistics

Downloads/month

200

GitHub Stars

15

Quality Score

89%

Bundle Size

NPM Keywords

tpmjs
github
git
devops
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai