Overview
GitHub tool allows you to search repositories, manage issues, and interact with GitHub’s API. The user asks about a repo or issue; the agent calls the GitHub API and returns the answer.Installation
Environment Variables
Quick Start
Usage with Agent
Available Methods
search_repos(query, limit=10)
Search GitHub repositories.get_repo(owner, repo)
Get repository details.list_issues(owner, repo, state=“open”)
List repository issues.create_issue(owner, repo, title, body)
Create a new issue.Common Errors
| Error | Cause | Solution |
|---|---|---|
GITHUB_TOKEN not configured | Missing token | Set environment variable |
Rate limited | Too many requests | Use authenticated requests |
Not found | Repo doesn’t exist | Check owner/repo name |
How It Works
Best Practices
Use a scoped token
Use a scoped token
Read the GitHub token from the environment and grant only the scopes the task needs.
Handle rate limits
Handle rate limits
GitHub throttles unauthenticated and heavy requests. Authenticate and retry with backoff.
Paginate large results
Paginate large results
Fetch issues and commits in pages so the agent processes manageable chunks.
Related Tools
Bitbucket
Bitbucket repos
Linear
Issue tracking
Jira
Project management

