Docs
GitHub

Tool catalog

All 97 tools by domain, with the 48 write tools marked.

Beginner7 min read

createGithubTools() returns 97 GitHub tools, 49 read and 48 write, grouped below by GitHub domain. The 48 marked Write ask for approval by default. Tools covers output shape, paging and overrides, and Presets lists which tools each job gets.

Repository

ToolWriteWhat it does
getRepositoryGet information about a GitHub repository including description, stars, forks, language, and default branch.
listBranchesList branches in a GitHub repository.
getFileContentGet the content of a file from a GitHub repository. Reads a line range with startLine/endLine or maxLines.
getRepositoryTreeList the file and directory structure of a repository at a given ref. Takes a path prefix.
createBranchYesCreate a new branch in a GitHub repository from an existing branch or commit SHA.
deleteBranchYesDelete a branch from a GitHub repository permanently.
forkRepositoryYesFork a GitHub repository to the authenticated user account or a specified organization.
createRepositoryYesCreate a new GitHub repository for the authenticated user or a specified organization.
createOrUpdateFileYesCreate or update a file in a GitHub repository. Provide the SHA when updating an existing file.
editFilesYesEdit files and commit them in one call: replace exact text in a file without reading or resending the whole file, or write whole files, on a new or existing branch, and optionally open a pull request. Replaces createBranch, createOrUpdateFile and createPullRequest chains.
getBranchRulesList what protects a branch: required status checks, required reviews, and the other ruleset and branch-protection rules. Use it to explain why a pull request cannot merge yet.
getCollaboratorPermissionGet a user's permission on a repository (admin, write, read or none) and their role. Use it to check whether a user may trigger the bot or approve an action. On a public repository, every user has at least read.

Pull requests

ToolWriteWhat it does
listPullRequestsList pull requests for a GitHub repository.
getPullRequestGet detailed information about a specific pull request. Body is truncated by default. Set detail: 'full' for the complete description.
createPullRequestYesCreate a new pull request in a GitHub repository.
mergePullRequestYesMerge a pull request.
updatePullRequestYesUpdate a pull request: title, body, state, base branch, or draft status. Draft toggling uses the GraphQL API.
updatePullRequestBranchYesBring a pull request branch up to date by merging its base branch into it, like the "Update branch" button. Optionally runs only if the head is still at expectedHeadSha.
addPullRequestCommentYesAdd a comment to a pull request.
updatePullRequestCommentYesUpdate the body of a comment on a pull request.
deletePullRequestCommentYesDelete a comment from a pull request permanently.
listPullRequestFilesList files changed in a pull request with status and stats. Patches are omitted unless includePatch is true, optionally limited by filenames.
listPullRequestReviewsList reviews on a pull request (approvals, change requests, and comments).
createPullRequestReviewYesSubmit a pull request review: approve, request changes, or comment with optional inline comments on a line or a range of lines, including suggested changes the author can apply.
listPullRequestReviewThreadsList review threads on a pull request with their comments, resolution state, and the IDs to reply (commentId) or resolve (threadId). Unresolved threads only by default (GraphQL API).
replyToReviewCommentYesReply to a pull request review comment, adding a message to its review thread.
resolveReviewThreadYesMark a pull request review thread as resolved.
requestReviewersYesRequest reviews from users or teams on a pull request.
enablePullRequestAutoMergeYesMerge a pull request automatically once its required checks and reviews pass. The repository must allow auto-merge; a pull request that can already merge needs mergePullRequest.
disablePullRequestAutoMergeYesCancel a pending auto-merge, so the pull request stays open when its checks pass.

Issues

ToolWriteWhat it does
listIssuesList issues for a GitHub repository (excludes pull requests).
getIssueGet detailed information about a specific issue. Body is truncated by default. Set detail: 'full' for the complete description.
listIssueCommentsList comments on a GitHub issue. Bodies are truncated by default.
createIssueYesCreate a new issue in a GitHub repository, optionally in a milestone.
addIssueCommentYesAdd a comment to a GitHub issue.
closeIssueYesClose an open GitHub issue.
updateIssueYesUpdate a GitHub issue: title, body, labels, milestone, or assignees. Also reopens or closes it through state.
updateIssueCommentYesUpdate the body of a comment on a GitHub issue.
deleteIssueCommentYesDelete a comment from a GitHub issue permanently.
listLabelsList labels available in a GitHub repository.
addLabelsYesAdd labels to an issue or pull request.
removeLabelYesRemove a label from an issue or pull request.
createLabelYesCreate a label in a GitHub repository.
updateLabelYesUpdate a label in a GitHub repository: name, color, or description.
deleteLabelYesDelete a label from a GitHub repository permanently.
addAssigneesYesAssign users to an issue or pull request.
removeAssigneesYesRemove assignees from an issue or pull request.
listMilestonesList milestones with their due dates and open and closed issue counts. Pass a milestone number to createIssue or updateIssue.
listSubIssuesList the sub-issues of an issue. A sub-issue can be in another repository of the same owner.
addSubIssueYesAdd an existing issue, from the same repository or another one with the same owner, as a sub-issue. An issue has at most one parent; replaceParent moves it.

Reactions

ToolWriteWhat it does
listIssueReactionsList reactions on an issue or pull request conversation, with per-emoji counts for the returned page.
addIssueReactionYesReact to an issue or pull request with an emoji. Acknowledges a report without adding a comment.
listCommentReactionsList reactions on an issue or pull request comment, with per-emoji counts for the returned page.
addCommentReactionYesReact to an issue or pull request comment with an emoji. Acknowledges a comment without a reply.

Discussions

ToolWriteWhat it does
listDiscussionsList discussions in a GitHub repository, most recently updated first, optionally filtered by category (GraphQL API).
getDiscussionGet a GitHub discussion by number. Body is truncated by default. Set detail: 'full' for the complete text (GraphQL API).
addDiscussionCommentYesAdd a comment to a GitHub discussion (GraphQL API).

Notifications

ToolWriteWhat it does
listNotificationsList notification threads for the authenticated user. Unread only unless all is true. Requires a token with notifications access.
markNotificationReadYesMark a single notification thread as read.

Commits

ToolWriteWhat it does
listCommitsList commits for a GitHub repository. Filters by path, author, since or until.
getCommitGet detailed information about a specific commit, including the list of files changed with additions and deletions. Patches are omitted unless includePatch is true.
getBlameLine-level git blame for a file at a commit-like ref (branch, tag, or SHA). Returns contiguous ranges mapping lines to the commits that last modified them, to see who introduced a line and when (GraphQL API).
compareCommitsCompare two branches, tags, or commits: ahead/behind counts, the commits in between, and the files that differ. Patches are omitted unless includePatch is true.

Gists

ToolWriteWhat it does
listGistsList gists for the authenticated user or a specific user.
getGistGet a gist by ID, including file contents.
listGistCommentsList comments on a gist.
createGistYesCreate a new gist with one or more files.
updateGistYesUpdate an existing gist: edit description, update files, or remove files.
deleteGistYesDelete a gist permanently.
createGistCommentYesAdd a comment to a gist.

Workflows

ToolWriteWhat it does
listWorkflowsList GitHub Actions workflows in a repository.
listWorkflowRunsList workflow runs for a repository, optionally filtered by workflow, branch, status, or event.
getWorkflowRunGet details of a specific workflow run including status, timing, and trigger info.
listWorkflowJobsList jobs for a workflow run, including step-level status and timing.
getWorkflowJobLogsGet the log output of a workflow job to diagnose failures. Returns the last maxLines lines (default 200) without per-line timestamps.
triggerWorkflowYesTrigger a workflow through a workflow_dispatch event.
cancelWorkflowRunYesCancel an in-progress workflow run.
rerunWorkflowRunYesRe-run a workflow run, optionally only the failed jobs.

Checks

ToolWriteWhat it does
listCheckRunsList check runs (Checks API: GitHub Actions and other CI providers) for a commit, branch, or tag.
getCombinedStatusGet the combined commit status (Statuses API: legacy CI integrations) for a commit, branch, or tag.
createCommitStatusYesReport a result on a commit as a commit status, such as pending while a bot works and then success or failure. It shows on the commit's pull requests and can be a required check.

createCommitStatus works with a personal access token or a GitHub App, while GitHub only lets a GitHub App create check runs. It needs the Commit statuses (write) permission, see Auth.

Releases

ToolWriteWhat it does
listReleasesList releases for a GitHub repository, newest first (includes drafts and prereleases). Bodies are truncated by default.
getLatestReleaseGet the latest published release for a GitHub repository (excludes drafts and prereleases). Body is truncated by default.
getReleaseGet a specific release by ID or tag, including its assets. Body is truncated by default.
createReleaseYesCreate a new release (and its tag if needed) in a GitHub repository.
updateReleaseYesUpdate an existing release: tag, target, title, notes, draft, or prerelease status.
deleteReleaseYesDelete a release permanently (does not delete the underlying git tag).
ToolWriteWhat it does
searchCodeSearch for code in GitHub repositories. Scope it with qualifiers such as repo:owner/name. Results include matching text snippets when GitHub returns them.
searchRepositoriesSearch for GitHub repositories by keyword, topic, language, or other qualifiers.
searchIssuesSearch for issues and pull requests across GitHub with search qualifiers such as repo:owner/name is:open.

Security alerts

ToolWriteWhat it does
listCodeScanningAlertsList code scanning alerts (CodeQL and other analysis tools) for a repository, newest first, with the rule, its severity, and the file and line of the latest instance. Needs code scanning set up on the repository.
listDependabotAlertsList Dependabot alerts for vulnerable dependencies, newest first, with the package, the advisory (GHSA and CVE IDs, severity, summary), the vulnerable range and the first patched version.
listSecretScanningAlertsList secret scanning alerts for credentials committed to a repository, newest first, with the secret type, whether the secret is still valid, and whether push protection was bypassed. The secret itself is never returned.

Context tools

ToolWriteWhat it does
getPullRequestContextFetch pull request details plus files, reviews, and optional CI checks and linked issues in one call, instead of separate getPullRequest, listPullRequestFiles and listPullRequestReviews calls.
getIssueContextFetch an issue plus available label names and recent comments in one call, for triage.
getReleaseContextFetch a release (latest, by ID, or by tag) plus the release before it and the comparison between their tags in one call, for preparing or reviewing a release.
getCiFailureContextDiagnose CI failures in one call, for a ref or one workflow run: failing checks and statuses (for a ref), recent failed runs, failed jobs and steps, and the end of each failed job's log.