GitHub
You have 26 GitHub tools that cover the full developer workflow: searching code, managing repositories, reading and writing files, triaging issues, reviewing and merging pull requests, creating releases, and orchestrating CI/CD pipelines. These tools call the GitHub REST API directly — no CLI binary required.
Available Tools
| Tool | Description | Mode |
|---|
| Search repositories, code, issues, and users across GitHub | read |
| List repositories for a user or organization | read |
| Get detailed metadata for a single repository | read |
| Create a new repository (public or private) | write |
| Embed an entire repository into the knowledge base for RAG queries | write |
| Read a file or directory listing from a repo at a given ref | read |
| Create or update a file in a repository (commit directly) | write |
| Create a new GitHub Gist (public or secret) | write |
| List and filter issues by state, labels, assignee, milestone | read |
| Open a new issue with title, body, labels, and assignees | write |
| Update an issue's title, body, state, labels, or assignees | write |
| List comments on an issue | read |
| List pull requests filtered by state, head, base, or author | read |
| Open a new pull request from a head branch to a base branch | write |
| Get the unified diff of a pull request | read |
| Submit a review (approve, request changes, or comment) with inline comments | write |
| Merge a pull request (merge, squash, or rebase strategy) | write |
| List review comments on a pull request | read |
| Post a new review comment on a pull request diff | write |
| List branches in a repository | read |
| Create a new branch from a given SHA or ref | write |
| List commits on a branch, path, or date range | read |
| List releases for a repository | read |
| Create a new release with tag, name, body, and asset uploads | write |
| List workflow runs, filtered by workflow, branch, or status | read |
| Trigger a workflow_dispatch event on a workflow | write |
Workflow: Repository Exploration
Discover and navigate repositories step by step:
- List repos — with an owner to see all their repositories.
- Get details — for the target repo (description, default branch, language, open issues count, license).
- Browse the tree — with path to get the root directory listing, then drill into subdirectories.
- Read specific files — with the full file path to read README, source files, configs, etc.
When exploring an unfamiliar project, start with the README and package manifests (package.json, Cargo.toml, pyproject.toml) to understand the stack before diving into source code.
Workflow: Codebase Deep-Dive
For large repositories where you need to answer questions across many files:
- Index the repo — embeds the entire codebase (or a filtered subset) into the knowledge base. This may take a moment for large repos.
- Ask questions — Once indexed, answer questions using RAG retrieval against the embedded codebase. This is far more efficient than reading files one by one.
Use this workflow when the user asks broad questions like "how does authentication work in this project?" or "find all usages of the database connection pool."
Workflow: Code Contribution
Make changes to a repository through the API:
- Create a branch — from the default branch HEAD (get the SHA from or ).
- Write files — to create or update files on the new branch. Each call creates a commit. For multiple file changes, make sequential writes to the same branch.
- Open a PR — with a clear title, detailed body describing the changes, and the head/base branches.
Always create feature branches rather than committing directly to the default branch.
Workflow: PR Review
Review pull requests with specific, actionable feedback:
- Read the diff — to get the full unified diff of the PR.
- Read changed files — for files that need full context beyond the diff hunks.
- Submit a review — with an event (APPROVE, REQUEST_CHANGES, or COMMENT) and inline comments referencing specific lines in the diff.
When reviewing, focus on correctness, security implications, test coverage, and adherence to project conventions. Reference specific line numbers in your inline comments.
Workflow: Issue Triage
Organize and manage the issue backlog:
- List issues — filtered by state, labels, or milestone to see what needs attention.
- Read context — on an issue to understand the full discussion.
- Update issues — to add labels (bug, enhancement, priority), assign team members, link to milestones, or close resolved issues.
- Create issues — when you identify new work items, bugs, or feature requests.
When triaging, check for duplicate issues first using
before creating new ones.
Workflow: Release Management
Cut releases with proper versioning and changelogs:
- Review commits — to see what has landed since the last release.
- Create the release — with a semantic version tag, a descriptive name, and release notes summarizing the changes.
Use conventional commit messages or the auto-generated notes feature to build changelogs. Tag format should follow the project's convention (e.g.,
or
).
Workflow: CI/CD
Monitor and trigger GitHub Actions workflows:
- List runs — filtered by workflow name, branch, or status to check the current state of CI.
- Trigger a workflow — to kick off a workflow_dispatch event, optionally passing input parameters.
- Poll for completion — again after triggering, filtering by the run ID or branch, to monitor progress until the run completes.
When a workflow fails, use
to identify the failing run, then investigate the related commits and PR for debugging context.
Safety Rules
- Confirm before write operations — Always confirm with the user before creating repos, writing files, merging PRs, creating releases, or triggering workflows.
- Check branch protection — Before writing files or merging, be aware that protected branches may reject direct pushes. Use feature branches and PRs instead.
- Never force-push — These tools do not support force-push, and you should never attempt destructive history rewrites through the API.
- Rate limit awareness — Authenticated requests are limited to 5,000/hour. For bulk operations (indexing, large searches), be mindful of consumption. The tools will return rate limit headers when approaching the threshold.
- Destructive actions are irreversible — Deleting branches, closing issues, and merging PRs cannot be undone through these tools. Double-check before proceeding.
Authentication
The GitHub tools authenticate using a personal access token from one of these sources, checked in order:
- environment variable
- environment variable
- CLI fallback (if is installed and authenticated)
Required scopes:
- — full access to private repositories (read/write code, issues, PRs, releases, Actions)
- — sufficient if you only work with public repositories
- — needed for
To create a token, visit
github.com/settings/tokens and select the scopes above. Fine-grained tokens scoped to specific repositories are recommended for production use.