GitHubTool provides methods to interact with GitHub repositories through the GitHub API using PyGithub.
Installation
Install the GitHub dependency:Constructor
GitHub personal access token or OAuth token for authentication
Optional API key for MCP server usage
Methods
get_issue
Get details of a GitHub issue.Repository name in format
owner/repoIssue number
create_issue
Create a new issue in a repository.Repository name in format
owner/repoIssue title
Issue body/description
create_pr
Create a pull request.Repository name in format
owner/repoPull request title
Branch name with changes
Base branch name (default: “main”)
Pull request description
Usage
With Agentor agent
Creating issues
Creating pull requests
Error handling
The tool returns error messages as strings when operations fail:Source reference
src/agentor/tools/github.py:13