Skip to main content

GitHub

Connects to the GitHub REST API for working with repositories, issues, pull requests, and code. An agent can list repos, triage issues, read files, search code, and open PRs.

Add to an agent node's tools array with _node_type: "tool-github". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
tokenYesGitHub Personal Access Token, sent as Authorization: Bearer <token>. Typically a stored secret.
{
"name": "github",
"_node_type": "tool-github",
"token": "{{ secret.GITHUB_TOKEN }}"
}

Tools

github_list_repos

List GitHub repositories for a user or organization.

Parameters

ParameterTypeRequiredDescription
ownerstringYesGitHub user or organization name

Returns: A newline-separated list of owner/repo: description lines (up to 30 most recently updated repos).

github_list_issues

List issues in a GitHub repository.

Parameters

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
statestringNoIssue state: open or closed (default: open)

Returns: A newline-separated list of #<number> <title> [<state>] lines (up to 30), or "No issues found.".

github_create_issue

Create a new issue in a GitHub repository.

Parameters

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
titlestringYesIssue title
bodystringNoIssue body/description

Returns: A confirmation message with the new issue number, title, and URL.

github_get_file

Get the content of a file from a GitHub repository.

Parameters

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
pathstringYesFile path in the repository
refstringNoBranch or commit SHA (default: main)

Returns: The decoded text content of the file.

github_search_code

Search code on GitHub. Use repo:owner/name to scope to a repo.

Parameters

ParameterTypeRequiredDescription
querystringYesSearch query (e.g. repo:owner/repo filename:main.go)

Returns: A newline-separated list of repo/full_name: path lines (up to 10 results), or "No results.".

github_create_pr

Create a pull request on GitHub.

Parameters

ParameterTypeRequiredDescription
ownerstringYesRepository owner
repostringYesRepository name
titlestringYesPR title
headstringYesBranch to merge from
basestringNoBranch to merge into (default: main)
bodystringNoPR description

Returns: A confirmation message with the new PR number, title, and URL.

Next