GitHub
v2.3.0Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
add_comment_to_pending_review
Add review comment to the requester's latest pending pull request review. A pending review needs to already exist to call this (check with the user if not sure).
| Parameter | Type | Description |
|---|---|---|
body * | string | The text of the review comment |
owner * | string | Repository owner |
path * | string | The relative path to the file that necessitates a comment |
pullNumber * | number | Pull request number |
repo * | string | Repository name |
subjectType * | string | The level at which the comment is targeted |
line | number | The line of the blob in the pull request diff that the comment applies to. For multi-line comments, the last line of the range |
side | string | The side of the diff to comment on. LEFT indicates the previous state, RIGHT indicates the new state |
startLine | number | For multi-line comments, the first line of the range that the comment applies to |
startSide | string | For multi-line comments, the starting side of the diff that the comment applies to. LEFT indicates the previous state, RIGHT indicates the new state |
add_issue_comment
Add a comment and/or reaction to a specific issue or issue comment in a GitHub repository. Use this tool with pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add or react to review comments. At least one of body or reaction is required.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | Issue or pull request number to comment on or react to. |
owner * | string | Repository owner |
repo * | string | Repository name |
body | string | Comment content. Required unless reaction is provided. |
comment_id | integer | The numeric ID of the issue or pull request comment to react to. Use this for reactions to comments; omit it to react to the issue or pull request itself. Cannot be combined with body. |
reaction | string | Emoji reaction to add. Required unless body is provided. |
add_reply_to_pull_request_comment
Add a reply and/or reaction to an existing pull request comment. This can create a new comment linked as a reply to the specified comment, add an emoji reaction to the specified comment, or do both. At least one of body or reaction is required.
| Parameter | Type | Description |
|---|---|---|
commentId * | number | The numeric ID of the pull request review comment to reply or react to. Use the number from a #discussion_r... anchor, not the GraphQL thread node ID (PRRT_...). |
owner * | string | Repository owner |
repo * | string | Repository name |
body | string | The text of the reply. Required unless reaction is provided. |
pullNumber | number | Pull request number. Required when body is provided. |
reaction | string | Emoji reaction to add. Required unless body is provided. |
assign_copilot_to_issue
Assign Copilot to a specific issue in a GitHub repository. This tool can help with the following outcomes: - a Pull Request created with source code changes to resolve the issue More information can be found at: - https://docs.github.com/en/copilot/concepts/agents/cloud-agent/about-cloud-agent
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | Issue number |
owner * | string | Repository owner |
repo * | string | Repository name |
base_ref | string | Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch |
custom_instructions | string | Optional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description |
create_branch
Create a new branch in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
branch * | string | Name for new branch |
owner * | string | Repository owner |
repo * | string | Repository name |
from_branch | string | Source branch (defaults to repo default) |
create_or_update_file
Create or update a single file in a GitHub repository. If updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations. To obtain the current blob SHA before updating, call the get_file_contents tool with the same owner, repo, and path, and set its ref parameter to this tool's branch value. The first text result reports the blob SHA for the requested path. SHA MUST be provided for existing file updates.
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to create/update the file in |
content * | string | Content of the file, exactly as it should appear once written. Do not base64-encode it; this server does that before calling the REST API. |
message * | string | Commit message |
owner * | string | Repository owner (username or organization) |
path * | string | Path where to create/update the file |
repo * | string | Repository name |
allow_symlink_write | boolean | Set true to update a symbolic link itself; content must be its new target path. |
sha | string | The blob SHA of the file being replaced. Required if the file already exists. Retrieve it with get_file_contents using the same owner, repo, and path, with ref set to this tool's branch value. |
create_pull_request
Create a new pull request in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
base * | string | Branch to merge into |
head * | string | Branch containing changes |
owner * | string | Repository owner |
repo * | string | Repository name |
title * | string | PR title |
body | string | PR description |
draft | boolean | Create as draft PR |
maintainer_can_modify | boolean | Allow maintainer edits |
reviewers | array | GitHub usernames or ORG/team-slug team reviewers to request reviews from |
create_repository
Create a new GitHub repository in your account or specified organization
| Parameter | Type | Description |
|---|---|---|
name * | string | Repository name |
autoInit | boolean | Initialize with README |
description | string | Repository description |
organization | string | Organization to create the repository in (omit to create in your personal account) |
private | boolean | Whether the repository should be private. Defaults to true (private) when omitted. |
delete_file
Delete a file from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to delete the file from |
message * | string | Commit message |
owner * | string | Repository owner (username or organization) |
path * | string | Path to the file to delete |
repo * | string | Repository name |
fork_repository
Fork a GitHub repository to your account or specified organization
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
organization | string | Organization to fork to |
get_commit
Get details for a commit from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
sha * | string | Commit SHA, branch name, or tag name |
detail | string | Level of detail to include for changed files. "none" omits stats and files entirely. "stats" (default) includes per-file metadata: filename, status, and lines-of-code counts (additions, deletions, cha… |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
get_file_contents
Get the contents of a file or directory from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
fields | array | Subset of fields to return for each entry when the path is a directory. If omitted, all fields are returned. Ignored when the path is a single file. Use this to reduce response size when listing direc… |
path | string | Path to file/directory |
ref | string | Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` |
sha | string | Accepts optional commit SHA. If specified, it will be used instead of ref |
get_label
Get a specific label from a repository.
| Parameter | Type | Description |
|---|---|---|
name * | string | Label name. |
owner * | string | Repository owner (username or organization name) |
repo * | string | Repository name |
get_latest_release
Get the latest release in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
get_me
Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.
get_release_by_tag
Get a specific release by its tag name in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
tag * | string | Tag name (e.g., 'v1.0.0') |
get_tag
Get details about a specific git tag in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
tag * | string | Tag name |
get_team_members
Get member usernames of a specific team in an organization. Limited to organizations accessible with current credentials
| Parameter | Type | Description |
|---|---|---|
org * | string | Organization login (owner) that contains the team. |
team_slug * | string | Team slug |
get_teams
Get details of the teams the user is a member of. Limited to organizations accessible with current credentials
| Parameter | Type | Description |
|---|---|---|
user | string | Username to get teams for. If not provided, uses the authenticated user. |
issue_read
Get information about a specific issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | The number of the issue |
method * | string | The read operation to perform on a single issue. Options are: 1. get - Get issue details. Also returns best-effort hierarchy flags (`has_parent`, `has_children`); `parent` and `sub_issues_summary` are… |
owner * | string | The owner of the repository |
repo * | string | The name of the repository |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
issue_write
Create a new or update an existing issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
method * | string | Write operation to perform on a single issue. Options are: - 'create' - creates a new issue. - 'update' - updates an existing issue. |
owner * | string | Repository owner |
repo * | string | Repository name |
assignees | array | Usernames to assign to this issue |
body | string | Issue body content |
duplicate_of | number | Issue number that this issue is a duplicate of. Required when state_reason is 'duplicate'. |
issue_fields | array | Issue field values to set or clear. Each item requires 'field_name' and exactly one of 'value', 'field_option_name', or 'delete: true'. |
issue_number | number | Issue number to update |
labels | array | Labels to apply to this issue |
milestone | number | Milestone number |
parent_issue_number | number | Issue number of the parent issue. Only used when method is 'create' and cannot be combined with issue_fields. The new issue is created and attached to this parent in the same operation. |
parent_owner | string | Repository owner of the parent issue. Must be provided with parent_repo. Omit both to use owner and repo. Only used when method is 'create' and parent_issue_number is provided. |
parent_repo | string | Repository name of the parent issue. Must be provided with parent_owner. Omit both to use owner and repo. Only used when method is 'create' and parent_issue_number is provided. |
state | string | New state |
state_reason | string | Reason for the state change. Ignored unless state is changed. |
title | string | Issue title |
type | Type of this issue. For updates, pass null to remove the current type. Only use if issue types are enabled for this repository. Use list_issue_types to get valid type values for this repository or its… |
list_branches
List branches in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
list_commits
Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
author | string | Author username or email address to filter commits by |
fields | array | Subset of fields to return for each commit. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields, e.g. just 'sha' and 'html_url'. |
page | number | Page number for pagination (min 1) |
path | string | Only commits containing this file path will be returned |
perPage | number | Results per page for pagination (min 1, max 100) |
sha | string | Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. |
since | string | Only commits after this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) |
until | string | Only commits before this date will be returned (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD) |
list_issue_fields
List issue fields for a repository or organization. Returns field definitions including name, type (text, number, date, single_select), and for single_select fields the list of valid option names. When repo is omitted, returns org-level fields directly.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The account owner of the repository or organization. The name is not case sensitive. |
repo | string | The name of the repository. When provided, returns fields for this specific repository (inherited from its organization). When omitted, returns org-level fields directly. |
list_issue_types
List supported issue types for a repository or its owner organization. When repo is omitted, returns org-level issue types directly.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The account owner of the repository or organization. |
repo | string | The name of the repository. When provided, returns issue types for this specific repository. When omitted, returns org-level issue types directly. |
list_issues
List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
after | string | Cursor for pagination. Use the cursor from the previous response. |
direction | string | Order direction. If provided, the 'orderBy' also needs to be provided. |
field_filters | array | Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD… |
fields | array | Subset of fields to return for each issue. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' and 'field_values' in particular dr… |
labels | array | Filter by labels |
orderBy | string | Order issues by field. If provided, the 'direction' also needs to be provided. |
perPage | number | Results per page for pagination (min 1, max 100) |
since | string | Filter by date (ISO 8601 timestamp) |
state | string | Filter by state, by default both open and closed issues are returned when not provided |
list_pull_requests
List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
base | string | Filter by base branch |
direction | string | Sort direction |
fields | array | Subset of fields to return for each pull request. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' in particular drops the larg… |
head | string | Filter by head user/org and branch |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
sort | string | Sort by |
state | string | Filter by state |
list_releases
List releases in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
fields | array | Subset of fields to return for each release. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' in particular drops the largest p… |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
list_repository_collaborators
List collaborators of a GitHub repository. Results are paginated; the response includes `nextPage`, `prevPage`, `firstPage`, and `lastPage` fields. To get the next page, use the `nextPage` value as the `page` parameter.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
affiliation | string | Filter by affiliation. Can be one of: 'outside' (outside collaborators), 'direct' (all with permissions regardless of org membership), 'all' (all collaborators). Default: 'all' |
page | number | Page number for pagination (default 1, min 1) |
perPage | number | Results per page for pagination (default 30, min 1, max 100) |
list_tags
List git tags in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
repo * | string | Repository name |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
merge_pull_request
Merge a pull request in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
pullNumber * | number | Pull request number |
repo * | string | Repository name |
commit_message | string | Extra detail for merge commit |
commit_title | string | Title for merge commit |
expectedHeadSha | string | The expected SHA of the pull request's HEAD ref |
merge_method | string | Merge method |
pull_request_read
Get information on a specific pull request in GitHub repository.
| Parameter | Type | Description |
|---|---|---|
method * | string | Action to specify what pull request data needs to be retrieved from GitHub. Possible options: 1. get - Get details of a specific pull request. 2. get_diff - Get the diff of a pull request. 3. get… |
owner * | string | Repository owner |
pullNumber * | number | Pull request number |
repo * | string | Repository name |
after | string | Cursor for pagination, used only by the get_review_comments method. Pass the endCursor from the previous page's PageInfo to fetch the next page. |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
pull_request_review_write
Create and/or submit, delete review of a pull request. Available methods: - create: Create a new review of a pull request. If "event" parameter is provided, the review is submitted. If "event" is omitted, a pending review is created. - submit_pending: Submit an existing pending review of a pull request. This requires that a pending review exists for the current user on the specified pull request. The "body" and "event" parameters are used when submitting the review. - delete_pending: Delete an existing pending review of a pull request. This requires that a pending review exists for the curren…
| Parameter | Type | Description |
|---|---|---|
method * | string | The write operation to perform on pull request review. |
owner * | string | Repository owner |
pullNumber * | number | Pull request number |
repo * | string | Repository name |
body | string | Review comment text |
commitID | string | SHA of commit to review |
event | string | Review action to perform. |
resolutionReason | string | Optional reason for resolving a Copilot code review thread: addressed, wont-fix, or invalid. |
threadId | string | The node ID of the review thread (e.g., PRRT_kwDOxxx). Required for resolve_thread and unresolve_thread methods. Get thread IDs from pull_request_read with method get_review_comments. |
push_files
Push multiple files to a GitHub repository in a single commit
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to push to |
files * | array | Array of file objects to push, each object with path (string) and content (string) |
message * | string | Commit message |
owner * | string | Repository owner |
repo * | string | Repository name |
request_copilot_review
Request a GitHub Copilot code review for a pull request. Use this for automated feedback on pull requests, usually before requesting a human reviewer.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
pullNumber * | number | Pull request number |
repo * | string | Repository name |
search_code
Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (GitHub code search REST). Implicit AND between terms; supports `OR`, `NOT`, and `"quoted phrase"` for exact match. Qualifiers: `repo:owner/repo`, `org:`, `user:`, `language:`, `path:dir`… |
fields | array | Subset of fields to return for each code search result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'repository' and 'text_matche… |
order | string | Sort order for results |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
sort | string | Sort field ('indexed' only) |
search_commits
Search for commits across GitHub repositories using GitHub's commit search syntax. Useful for finding specific changes, authors, or messages across one or many repositories. Searches the default branch only.
| Parameter | Type | Description |
|---|---|---|
query * | string | Commit search query (GitHub commit search REST). Searches commit messages on the default branch only. Scope the search with `repo:owner/repo`, `org:`, or `user:` (queries without a scope qualifier mat… |
order | string | Sort order |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
sort | string | Sort by author or committer date (defaults to best match) |
search_issues
Search issues using natural-language semantic matching. Best for conceptual or paraphrased queries (e.g. "login fails after password reset"). Already scoped to is:issue.
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR. |
fields | array | Subset of fields to return for each issue result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body', 'reactions', and 'labels' i… |
order | string | Sort order |
owner | string | Optional repository owner. If provided with repo, only issues for this repository are listed. |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
repo | string | Optional repository name. If provided with owner, only issues for this repository are listed. |
sort | string | Sort field by number of matches of categories, defaults to best match |
search_pull_requests
Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query using GitHub pull request search syntax |
fields | array | Subset of fields to return for each pull request result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body', 'reactions', and 'la… |
order | string | Sort order |
owner | string | Optional repository owner. If provided with repo, only pull requests for this repository are listed. |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
repo | string | Optional repository name. If provided with owner, only pull requests for this repository are listed. |
sort | string | Sort field by number of matches of categories, defaults to best match |
search_repositories
Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.
| Parameter | Type | Description |
|---|---|---|
query * | string | Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. |
minimal_output | boolean | Return minimal repository information (default: true). When false, modern clients receive additional curated repository details, not the complete GitHub API object. Legacy clients retain full GitHub A… |
order | string | Sort order |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
sort | string | Sort repositories by field, defaults to best match |
search_users
Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.
| Parameter | Type | Description |
|---|---|---|
query * | string | User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user. |
order | string | Sort order |
page | number | Page number for pagination (min 1) |
perPage | number | Results per page for pagination (min 1, max 100) |
sort | string | Sort users by number of followers or repositories, or when the person joined GitHub. |
sub_issue_write
Add a sub-issue to a parent issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | The number of the parent issue |
method * | string | The action to perform on a single sub-issue Options are: - 'add' - add a sub-issue to a parent issue in a GitHub repository. - 'remove' - remove a sub-issue from a parent issue in a GitHub repository.… |
owner * | string | Repository owner |
repo * | string | Repository name |
sub_issue_id * | number | The ID of the sub-issue to add. ID is not the same as issue number |
after_id | number | The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) |
before_id | number | The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) |
replace_parent | boolean | When true, replaces the sub-issue's current parent issue. Use with 'add' method only. |
ui_get
Fetch UI data for MCP Apps (labels, assignees, milestones, issue types, branches, issue fields, reviewers).
| Parameter | Type | Description |
|---|---|---|
method * | string | The type of data to fetch |
owner * | string | Repository owner (required for all methods) |
repo | string | Repository name (required for labels, assignees, milestones, branches, issue fields, reviewers) |
update_issue_comment
Update the body of an existing issue or pull request conversation comment. This tool cannot update pull request review comments.
| Parameter | Type | Description |
|---|---|---|
body * | string | New comment content |
comment_id * | integer | The numeric ID of the issue or pull request conversation comment to update. Do not use a pull request review comment ID. |
owner * | string | Repository owner |
repo * | string | Repository name |
update_pull_request
Update an existing pull request in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
pullNumber * | number | Pull request number to update |
repo * | string | Repository name |
base | string | New base branch name |
body | string | New description |
draft | boolean | Mark pull request as draft (true) or ready for review (false) |
maintainer_can_modify | boolean | Allow maintainer edits |
reviewers | array | GitHub usernames or ORG/team-slug team reviewers to request reviews from |
state | string | New state |
title | string | New title |
update_pull_request_branch
Update the branch of a pull request with the latest changes from the base branch.
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner |
pullNumber * | number | Pull request number |
repo * | string | Repository name |
expectedHeadSha | string | The expected SHA of the pull request's HEAD ref |