GitHub Tools
github_tools · Nodes · AI
Makes the GitHub tools you pick available to AI steps.
GitHub Tools#
Packages the GitHub tools you pick for AI Agent tools input.
- Select either a
githubGitHub App installation connection or agithub_oauthordinary GitHub OAuth user connection. - Pick the tools to emit in
tools, a list of tool names without thegithub_prefix, for example["list_issues", "get_pull_request"]. The list starts empty, so the node emits nothing until you pick a tool. - Wire
toolsoutput into an AI Agenttoolsinput. - This node does not call GitHub during workflow execution. The agent calls GitHub only when it invokes an emitted tool.
- OAuth uses exactly
repoorpublic_repo. A GitHub App installation needs the matching repository permissions: Issues and Pull requests read for the read tools, write for the write tools.
Tool groups#
Agents and the Connection Tool Provider node get the same tools from six GitHub tool groups, one per area. Each group names its GitHub connection and has one switch per tool, named like the node's tool names. Every switch is on until you turn it off.
| Group | Tools |
|---|---|
github_repositories |
list_repositories, get_repository |
github_issues |
list_issues, search_issues, get_issue, view_issue_attachment, create_issue, update_issue, add_issue_labels, remove_issue_label, add_issue_assignees, remove_issue_assignees |
github_issue_comments |
list_issue_comments, get_issue_comment, create_issue_comment, update_issue_comment, delete_issue_comment |
github_pull_requests |
get_pull_request, view_pull_request_attachment, get_pull_request_diff, list_pull_request_files, list_pull_request_commits, create_pull_request, update_pull_request, merge_pull_request, request_pull_request_reviewers, remove_pull_request_reviewers |
github_pull_request_reviews |
list_pull_request_reviews, get_pull_request_review, list_comments_for_pull_request_review, create_pull_request_review, update_pull_request_review, submit_pull_request_review, dismiss_pull_request_review, delete_pending_pull_request_review |
github_review_comments |
list_pull_request_review_comments, get_pull_request_review_comment, create_pull_request_review_comment, reply_to_pull_request_review_comment, update_pull_request_review_comment, delete_pull_request_review_comment |
The node and each group take a Retry setting, off by default, which every request of their tools follows; see Retries. Requests are judged by method: GET reads, PUT and DELETE are sent again freely; POST and PATCH writes only when GitHub refused them before acting: the connection never opened, or GitHub answered 425 or 429.
Tool names#
Every emitted tool is called <handle>__<tool>, where <handle> is the fixed handle of the
configured GitHub connection, for example github__github_list_issues. The prefix is there even
when the workspace has a single GitHub connection. Renaming the connection never changes it. A
name longer than 64 characters keeps its first 55 characters and ends with _ and an 8-character
hash. The names below, and the cross-references in tool descriptions, are the <tool> part.
Tools#
Read-only:
github_list_repositories,github_get_repositorygithub_list_issues— issues and pull requests in one listinggithub_search_issues— GitHub search across repositoriesgithub_get_issue— an issue or pull request by numbergithub_get_pull_request— branches, head SHA, merge state, requested reviewers, diff sizegithub_get_pull_request_diff— the change as a unified diff or a patch seriesgithub_list_pull_request_files,github_list_pull_request_commitsgithub_list_issue_comments,github_get_issue_comment— conversation commentsgithub_view_issue_attachment,github_view_pull_request_attachment— files uploaded to an issue or pull requestgithub_list_pull_request_reviews,github_get_pull_request_review— reviewsgithub_list_comments_for_pull_request_review— the inline comments one review madegithub_list_pull_request_review_comments,github_get_pull_request_review_comment— inline review comments
Write:
github_create_issue,github_update_issuegithub_add_issue_labels,github_remove_issue_labelgithub_add_issue_assignees,github_remove_issue_assigneesgithub_create_issue_comment,github_update_issue_comment,github_delete_issue_commentgithub_create_pull_request,github_update_pull_request,github_merge_pull_requestgithub_request_pull_request_reviewers,github_remove_pull_request_reviewersgithub_create_pull_request_review,github_update_pull_request_review,github_submit_pull_request_review,github_dismiss_pull_request_review,github_delete_pending_pull_request_reviewgithub_create_pull_request_review_comment,github_reply_to_pull_request_review_comment,github_update_pull_request_review_comment,github_delete_pull_request_review_comment
The node's tools entries and each group's switches are named after the tool without the github_ prefix.
Scope#
These tools read and manage repositories, issues, pull requests, their conversations, and their code reviews.
They do not commit code, edit files, create or delete branches, or perform repository administration. Merging is the one pull request action that changes a branch.
Issues and pull requests are one listing#
GitHub numbers issues and pull requests in a single sequence, and /issues returns both. These tools mirror that rather than inventing an issues-only endpoint:
github_list_issuesreturns both. An item that is a pull request carries GitHub'spull_requestkey, andtypenarrows to one (all,issue,pull_request; defaultall).- The type filter applies before
offsetandlimit, so a filtered page is a full page andhas_moredescribes the filtered sequence. github_get_issueresolves either kind by number.github_update_issue, the label and assignee tools, and the conversation comment tools take either number too.github_get_pull_requestis separate because/pulls/{number}is the only endpoint carryingbase,head(with their SHAs),draft, merge state, requested reviewers, and diff size.github_update_pull_requestis separate for the same reason: base branch and maintainer access exist only on pull requests.
Three kinds of pull request discussion#
GitHub keeps these apart, and so do the tools:
- Conversation comments sit on the timeline of an issue or pull request:
github_*_issue_comment. - Reviews are a verdict (
APPROVED,CHANGES_REQUESTED,COMMENTED,DISMISSED,PENDING) with a summary:github_*_pull_request_review. - Review comments are anchored to a file and line of the diff:
github_*_pull_request_review_comment. Each carriespull_request_review_idfor the review it belongs to andin_reply_to_idfor the thread it answers. A comment whoselineis null is outdated;original_linesays where it was.
A conversation comment id and a review comment id address different resources; pass each to its own tools.
A review created without event stays PENDING, visible only to its author, until github_submit_pull_request_review; github_delete_pending_pull_request_review discards it with its draft comments. A submitted review cannot be deleted, only dismissed. github_list_comments_for_pull_request_review lists one review's inline comments without scanning the whole pull request. GitHub only dismisses approvals and change requests, and refuses a verdict other than COMMENT on the author's own pull request.
Pagination#
- List tools accept
limitandoffset.limitdefaults to20and is capped at100;offsetdefaults to0and counts items, not GitHub pages. - Every list result carries
count,limit,offset,has_more, andnext_offset.next_offsetis where the next page starts whilehas_moreis true, andnullat the end; pass it back asoffsetto continue. A page can hold fewer thanlimititems when the items are large (see below);next_offsetthen continues from the first item it left out. - Each call walks GitHub's pages from the first, following its
Linkheader, so a deep offset costs one GitHub request per 100 items before it. - Offsets are positions in a live listing. An item created or closed between calls shifts later positions.
- GitHub caps some listings: pull request files at 3000 and pull request commits at 250.
github_search_issuesalso returnstotal_count,incomplete_results(GitHub timed out before searching everywhere, on any page read),result_limit(1000), andresults_capped. GitHub serves only the first 1000 matches of a query, so whenresults_cappedis true,has_morerunning out does not mean every match was seen; narrow the query to reach the rest.
Viewing attachments#
github_get_issue, github_get_pull_request, github_get_issue_comment and
github_list_issue_comments return attachments for GitHub uploads linked in the issue or
pull request description or its conversation comments. Pass the listed attachment_id and
the repository and parent number to the viewer. Both viewers are available with GitHub OAuth
and GitHub App installation connections; GitHub can refuse a file the connection can't read.
Results are GitHub's JSON, bounded in size#
Every result carries GitHub's objects as GitHub returns them, with every field, so GitHub's REST documentation describes them. What is bounded is size, because a single call must not crowd out the conversation: a result that fills the model's context forces a compaction, and the compaction discards the result the call just fetched.
- One result holds at most about 100,000 characters, well inside the agent loop's own 256,000-character limit.
- In a list, any string longer than 2,000 characters is cut, and a page holds as many items as fit.
- In an item fetched by number or id, any string other than the body is cut at 20,000 characters.
- Every cut is named in
truncatedby its path, such asitems[3].bodyorcomment.diff_hunk. A field not named there is GitHub's whole value.
Reading long text#
Nothing long is out of reach: a getter returns one window of the full text and says where the next starts.
github_get_issue,github_get_pull_request,github_get_issue_comment,github_get_pull_request_review, andgithub_get_pull_request_review_commentreturn up to 40,000 characters of the body.github_get_pull_request_diffreturns up to 80,000 characters of the diff or patch.- Each such result carries
text_window:unit(characters),offset,returned,total, andnext_offset. Offsets count Unicode characters. - When
next_offsetis not null, call the same tool again withtext_offsetset to it. - Every commit's full message is in
github_get_pull_request_diffwithformat: patch.
Parameters#
- Operations targeting a specific repository accept optional
owner. A trimmed explicit owner wins; otherwise the App installation account login is used forgithub, or the verified user login forgithub_oauth. github_list_repositoriesandgithub_search_issuesdo not acceptowner.repois the repository name without owner.- Repository listing uses
/installation/repositoriesforgithuband/user/reposforgithub_oauth. statefilters areopen,closed, orall; omit them or passnullfor GitHub's default open state.issue_number,pull_number,comment_id, andreview_idare integers.- Text the agent passes is sent literally; template syntax in a comment is part of the comment.
github_search_issuestakes GitHub's advanced search syntax and needsis:issueoris:prfor some connections. GitHub allows about 30 searches a minute.- Label, assignee, and reviewer arrays are sent exactly as given; a label name containing a comma stays one label.
github_update_issueandgithub_update_pull_requestchange only the fields given; null and empty strings leave a field alone.labelsandassigneesreplace the whole set, and an empty array clears it;clear_milestoneremoves the milestone. To change one label or assignee, use the add and remove tools.github_merge_pull_requestacceptssha, normallyhead.shafromgithub_get_pull_request, to refuse a merge if the branch moved.- Review comments take
commit_id(normallyhead.sha),path, and thelinethe comment ends on, onsideRIGHT(head) orLEFT(base);start_linemakes a range, andsubject_type: filecomments on the whole file. - When GitHub refuses a request, the error carries its status and GitHub's own explanation, such as a missing permission or why a merge is not possible.
Write tools should only be used when the user clearly asks for the action or confirms it.
Inputs
inputRequired
Outputs
tools
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
connection | connection | Yes | GitHub connection used by emitted tools |
retry | tagged_union | No | Sends a request again after a failure that passes: a rate limit, a busy server, a dropped connection. Off sends once. |
tools | array<enum(list_repositories, get_repository, list_issues, search_issues, get_issue, view_issue_attachment, create_issue, update_issue, add_issue_labels, remove_issue_label, add_issue_assignees, remove_issue_assignees, list_issue_comments, get_issue_comment, create_issue_comment, update_issue_comment, delete_issue_comment, get_pull_request, view_pull_request_attachment, get_pull_request_diff, list_pull_request_files, list_pull_request_commits, create_pull_request, update_pull_request, merge_pull_request, request_pull_request_reviewers, remove_pull_request_reviewers, list_pull_request_reviews, get_pull_request_review, list_comments_for_pull_request_review, create_pull_request_review, update_pull_request_review, submit_pull_request_review, dismiss_pull_request_review, delete_pending_pull_request_review, list_pull_request_review_comments, get_pull_request_review_comment, create_pull_request_review_comment, reply_to_pull_request_review_comment, update_pull_request_review_comment, delete_pull_request_review_comment)> | No | The GitHub tools to emit, each named after its tool without the github_ prefix. Starts empty: pick every tool the agent may call. |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |