> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# GitHub

**Authentication:** OAuth or personal access token. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Triage open issues across our org. Assign me to anything labeled `priority:high` and post a daily digest in Slack.
* Open a pull request from `feature/billing-refactor` into `main` with the changelog as the description and request review from the platform team.
* Find every open PR that hasn't had a review in three days and DM the assigned reviewer.
* Summarize what landed in our production repos this week. Group by author.

## Available Tools

#### list\_workflows

List all workflows in a repository's .github/workflows directory. Returns workflow IDs needed for other workflow tools

#### get\_workflow

Get a specific workflow by ID or filename (e.g. 'ci.yml'). Use list\_workflows to discover workflow IDs

#### list\_workflow\_runs

List workflow runs for a repository or specific workflow. Filter by branch or status. Returns run history

#### get\_workflow\_run

Get details for a specific workflow run including status, conclusion, and timing

#### trigger\_workflow

Trigger a workflow dispatch event to manually run a workflow. The workflow must have a workflow\_dispatch trigger

#### list\_workflow\_jobs

List jobs for a workflow run. Each job represents a step in the workflow

#### get\_job\_logs

Get the log content for a workflow job. Use list\_workflow\_jobs to find job IDs

#### list\_discussion\_categories

List discussion categories available in a repository. Categories are required when creating discussions

#### list\_discussions

List discussions in a repository. Returns discussion metadata including category, comment count, and author

#### get\_discussion

Get a specific discussion by number including body, category, and metadata

#### get\_discussion\_comments

Get comments on a discussion thread with pagination

#### create\_discussion\_comment

Add a comment to a discussion. Supports GitHub Markdown formatting

#### update\_discussion\_comment

Update an existing discussion comment. Use get\_discussion\_comments to find comment IDs

#### get\_file\_contents

Get file or directory contents from a repository. For files, returns base64-encoded content and metadata

#### create\_or\_update\_file

Create or update a single file in a repository. Provide the sha of an existing file to update it

#### delete\_file

Delete a file from a repository. Requires the file's current blob SHA (get sha from get\_file\_contents)

#### push\_files

Push multiple files in a single commit using the Git Data API. Creates or updates multiple files atomically

#### get\_repository\_tree

Get the complete file tree for a repository. Use recursive=true (default) to get all files in all subdirectories

#### list\_gists

List gists for the authenticated user or a specific user. Gists are public or secret code snippets

#### get\_gist

Get a specific gist by ID including all file contents

#### create\_gist

Create a new gist with one or more files. Set public=true for a public gist visible to everyone

#### update\_gist

Update a gist's description or file contents. To delete a file, set its value to null in the files map

#### delete\_gist

Delete a gist permanently. Only the gist owner can delete it

#### get\_issue

Get a single issue by number from a specific repository. Returns detailed issue information including comments, labels, and assignees

#### get\_issues

Get a list of issues from a repository with filtering options by state, labels, assignee, creator, and more. Supports pagination and sorting

#### search\_issues

Search for issues across all accessible repositories using GitHub's search syntax. Supports advanced filtering and sorting options

#### create\_issue

Create a new issue in a repository with title, body, labels, assignees, and milestone. Returns the created issue

#### update\_issue

Update an existing issue's title, body, state, labels, assignees, milestone, and other properties

#### close\_issue

Close an issue by setting its state to closed. Optionally specify a reason for closing

#### reopen\_issue

Reopen a closed issue by setting its state to open

#### get\_issue\_comments

Get comments for a specific issue. Supports filtering by date and pagination for issues with many comments

#### create\_issue\_comment

Create a new comment on an issue. Comments support GitHub markdown formatting

#### update\_issue\_comment

Update an existing issue comment's content. Only the comment author or repository owners can update comments

#### delete\_issue\_comment

Delete an issue comment. Only the comment author or repository owners can delete comments

#### add\_labels\_to\_issue

Add labels to an issue. Labels must already exist in the repository

#### remove\_label\_from\_issue

Remove a specific label from an issue

#### set\_issue\_labels

Set labels on an issue, replacing all existing labels with the new set

#### remove\_all\_labels\_from\_issue

Remove all labels from an issue

#### lock\_issue

Lock an issue to prevent new comments. Only collaborators will be able to add new comments

#### unlock\_issue

Unlock an issue to allow new comments from all users

#### list\_labels

List labels for a repository with pagination

#### get\_label

Get a single repository label by name. Use list\_labels to browse all labels

#### create\_label

Create a new label in a repository. Color must be a 6-character hex code without the # (e.g. 'f29513')

#### update\_label

Update an existing repository label's name, color, or description

#### delete\_label

Delete a label from a repository. This removes the label from all issues and pull requests that have it

#### list\_notifications

List notifications for the authenticated user. Set all=true to include read notifications

#### get\_notification

Get details for a specific notification thread by ID. Use list\_notifications to find thread IDs

#### mark\_notification\_read

Mark a notification thread as read

#### mark\_all\_notifications\_read

Mark all notifications as read. Optionally scope to a specific repository

#### dismiss\_notification

Unsubscribe from a notification thread so you no longer receive notifications for it

#### manage\_notification\_subscription

Subscribe to or mute a notification thread. Set subscribed=true to receive notifications, ignored=true to mute

#### manage\_repo\_notification\_subscription

Manage repository-level notification subscription. Set subscribed=true to watch all notifications

#### get\_pull\_request

Get a single pull request by number from a specific repository. Returns detailed PR information including merge status, reviews, and file changes

#### get\_pull\_requests

Get a list of pull requests from a repository with filtering options by state, head/base branches, and sorting. Supports pagination

#### create\_pull\_request

Create a new pull request to merge changes from one branch into another. Supports creating draft PRs and setting reviewers

#### update\_pull\_request

Update an existing pull request's title, body, state, base branch, and other properties

#### merge\_pull\_request

Merge a pull request using specified merge method (merge, squash, or rebase). Verifies PR can be merged before attempting

#### close\_pull\_request

Close a pull request without merging it. The PR can be reopened later if needed

#### reopen\_pull\_request

Reopen a closed pull request. The PR must not be merged to be reopened

#### convert\_to\_draft

Convert a pull request to draft status, preventing it from being merged until marked ready for review

#### mark\_ready\_for\_review

Mark a draft pull request as ready for review, allowing it to be merged once approved

#### get\_pull\_request\_reviews

Get reviews for a pull request including approval status, comments, and reviewer information

#### create\_pull\_request\_review

Create a review for a pull request with approval, change requests, or general comments

#### create\_pull\_request\_comment

Create a review comment on a pull request for code review. Comments specific lines of code in pull request diffs

#### add\_reply\_to\_pull\_request\_comment

Reply to an existing review comment on a pull request

#### request\_reviewers

Request specific users or teams to review a pull request. Reviewers will be notified of the request

#### remove\_review\_request

Remove review requests from specific users or teams for a pull request

#### get\_pull\_request\_files

Get the files changed in a pull request with diff information, additions, deletions, and patch data

#### check\_if\_merged

Check if a pull request has been merged and get merge details if applicable

#### get\_pull\_request\_commits

Get commits in a pull request showing the individual changes that make up the PR

#### update\_pull\_request\_branch

Update the head branch of a pull request to include the latest changes from the base branch

#### get\_commit\_status

Get the combined status for a specific commit or ref (legacy statuses API)

#### get\_check\_runs

Get check runs for a specific commit or ref (Checks API)

#### get\_pull\_request\_checks

Get an overall CI status summary for a PR's head commit, including checks and legacy status

#### get\_repository

Get a single repository by owner and name. Returns detailed repository information including stats, settings, and metadata

#### get\_repositories

Get a list of repositories. Can filter by type, visibility, and sort options. Supports pagination for large result sets

#### create\_repository

Create a new repository. Can create private or public repositories with various settings like issues, wiki, etc

#### create\_organization\_repository

Create a new repository in an organization. Can create private or public repositories with various settings like issues, wiki, etc

#### update\_repository

Update an existing repository's settings, description, visibility, and other properties

#### delete\_repository

Delete a repository permanently. This action cannot be undone. Use with extreme caution

#### fork\_repository

Fork a repository into the authenticated user's account or a specified organization

#### list\_repository\_collaborators

List collaborators for a repository. Filter by affiliation: outside (external), direct, or all

#### get\_branches

Get repository branches with optional filtering by protection status. Includes commit information for each branch

#### create\_branch

Create a new branch from an existing commit. Requires the SHA of the commit to branch from

#### get\_commits

Get repository commits with filtering options by author, date range, file path, and branch/SHA

#### get\_commit

Get a single commit by SHA with detailed information including file changes, statistics, and parent commits

#### get\_releases

Get repository releases including tags, assets, and release notes. Returns both published and draft releases

#### get\_latest\_release

Get the latest release for a repository. Returns the most recent non-prerelease, non-draft release

#### get\_release\_by\_tag

Get a release by its tag name (e.g. 'v1.0.0'). Use get\_releases to list all releases

#### list\_tags

List tags for a repository with pagination

#### check\_starred

Check if the authenticated user has starred a repository

#### star\_repository

Star a repository for the authenticated user

#### unstar\_repository

Unstar a repository for the authenticated user

#### search\_repositories

Search GitHub repositories using search syntax. Supports qualifiers like language:python, stars:>100

#### search\_code

Search code across GitHub repositories. Must include a qualifier: repo:, org:, user:, language:, or path:

#### search\_commits

Search commits across GitHub repositories. Use qualifiers like author:, committer:, author-date:

#### search\_pull\_requests

Search pull requests across GitHub repositories. Supports filtering by state, author, reviewer, label

#### search\_users

Search GitHub users and organizations. Use qualifiers like type:user, type:org, location:

#### search\_orgs

Search for organizations on GitHub. Use qualifiers like location:, language:, repos:>N

#### get\_authenticated\_user

Get the authenticated user's profile information including public and private details

#### get\_user

Get detailed information about any GitHub user by their username

#### get\_organization

Get detailed information about a GitHub organization by its name

#### get\_followers

Get a list of users who follow a specific user. Supports pagination for users with many followers

#### get\_following

Get a list of users that a specific user follows. Supports pagination for users who follow many people

#### check\_following

Check if the authenticated user follows a specific user

#### follow\_user

Follow a user as the authenticated user. The user will be notified of the follow

#### unfollow\_user

Unfollow a user as the authenticated user

#### get\_organization\_members

Get members of an organization with filtering options by role and 2FA status

#### get\_user\_organizations

Get organizations that a user is publicly a member of

#### get\_organization\_teams

Get teams in an organization. Requires organization membership or public visibility

#### get\_team\_members

Get members of a specific team with filtering by role (member or maintainer)

#### check\_team\_membership

Check if a user is a member of a specific team

#### add\_team\_membership

Add a user to a team with specified role (member or maintainer). Requires admin permissions

#### remove\_team\_membership

Remove a user from a team. Requires admin permissions

#### create\_team

Create a team in an organization. Requires org admin permissions

#### get\_user\_memberships

Get the authenticated user's organization memberships including private memberships

#### get\_user\_events

Get public events for a user showing their recent GitHub activity

#### get\_user\_starred\_repos

Get repositories starred by a user. Shows what projects they have bookmarked