GitHubTool provides methods to interact with GitHub repositories through the GitHub API using PyGithub.
Installation
Install the GitHub dependency:Constructor
str
required
GitHub personal access token or OAuth token for authentication
str
Optional API key for MCP server usage
Methods
get_issue
Get details of a GitHub issue.str
required
Repository name in format
owner/repoint
required
Issue number
create_issue
Create a new issue in a repository.str
required
Repository name in format
owner/repostr
required
Issue title
str
Issue body/description
create_pr
Create a pull request.str
required
Repository name in format
owner/repostr
required
Pull request title
str
required
Branch name with changes
str
Base branch name (default: “main”)
str
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