Api
Every available tool, grouped by domain and write-safety status. Tools run as durable workflow steps when used with Vercel Workflow.
Each tool is implemented with a durable "use step" boundary, so calls are proper workflow steps (retries, observability, full Node) when you run inside the Vercel Workflow SDK. For a full agent loop that is also durable, use createDurableGithubAgent from @github-tools/sdk/workflow.
AI assistant prompt (cherry-pick tools)
Prompt
Replace createGithubTools() with cherry-picked tool factories from @github-tools/sdk in this file.
- Import only the factories needed; pass the GitHub token string to each
- Keep existing model and prompts unchanged
- Note: each factory still uses durable "use step" when running under Vercel Workflow (https://github-tools.com/guide/durable-workflows)
Repository tools
Available in all presets. These tools manage repositories, branches, and file content:
| Tool | Capability | Write |
|---|---|---|
getRepository | read repository metadata (name, description, stars, language) | — |
listBranches | list branches and their HEAD commits | — |
getFileContent | read a file at a specific path and ref | — |
createBranch | create a new branch from an existing branch or commit SHA | Yes |
forkRepository | fork a repository to your account or an organization | Yes |
createRepository | create a new repository for the authenticated user or an organization | Yes |
createOrUpdateFile | create or update a file in the repository | Yes |
Pull request tools
Available in code-review and maintainer presets:
| Tool | Capability | Write |
|---|---|---|
listPullRequests | list pull requests filtered by state | — |
getPullRequest | read PR details including diff stats | — |
listPullRequestFiles | list files changed in a PR with diff status and patches | — |
listPullRequestReviews | list reviews on a PR (approvals, change requests, comments) | — |
createPullRequest | open a new pull request | Yes |
mergePullRequest | merge a pull request | Yes |
addPullRequestComment | post a review comment | Yes |
createPullRequestReview | submit a formal review (approve, request changes, or comment) with inline comments | Yes |
Issue tools
Available in issue-triage and maintainer presets:
| Tool | Capability | Write |
|---|---|---|
listIssues | list issues filtered by state and labels | — |
getIssue | read issue details and comments | — |
createIssue | create a new issue | Yes |
addIssueComment | post a comment on an issue | Yes |
closeIssue | close an issue thread | Yes |
listLabels | list labels available in a repository | — |
addLabels | add labels to an issue or pull request | Yes |
removeLabel | remove a label from an issue or pull request | Yes |
Gist tools
Available in repo-explorer (read-only) and maintainer presets:
| Tool | Capability | Write |
|---|---|---|
listGists | list gists for the authenticated user or a specific user | — |
getGist | read a gist including file contents | — |
listGistComments | list comments on a gist | — |
createGist | create a new gist with one or more files | Yes |
updateGist | update gist description, files, or remove files | Yes |
deleteGist | permanently delete a gist | Yes |
createGistComment | post a comment on a gist | Yes |
Workflow tools
Available in repo-explorer (read-only), ci-ops, and maintainer presets:
| Tool | Capability | Write |
|---|---|---|
listWorkflows | list GitHub Actions workflows in a repository | — |
listWorkflowRuns | list workflow runs filtered by workflow, branch, status, or event | — |
getWorkflowRun | read a workflow run's status, timing, and trigger info | — |
listWorkflowJobs | list jobs in a workflow run with step-level status | — |
triggerWorkflow | trigger a workflow via workflow_dispatch event | Yes |
cancelWorkflowRun | cancel an in-progress workflow run | Yes |
rerunWorkflowRun | re-run a workflow run, optionally only failed jobs | Yes |
Search and commit tools
Available in all presets:
| Tool | Capability | Write |
|---|---|---|
listCommits | list commit history for a branch | — |
getCommit | read a single commit with its diff | — |
getBlame | line-level git blame for a file (GraphQL) | — |
searchCode | search code across repository files | — |
searchRepositories | search repositories by query | — |
Identify write operations
All tools marked Write can be gated with requireApproval. In production, always pair them with:
- a scoped preset to limit which writes are available
- a fine-grained token to limit what the token can do
- an explicit approval policy to intercept mutations before execution