GitHub — Tool Reference
Manage issues, pull requests, labels, repositories, and project boards on GitHub
Your AI assistant discovers and invokes these tools through the
MCP Server's meta tools —
it calls execute_tool with the tool name and arguments below.
# add_issue_comment write
Add a comment to a GitHub issue or pull request.
Full description
Add a comment to a GitHub issue or pull request.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Issue or pull request number (required)
body: Comment body in Markdown (required)
Returns:
AddIssueCommentResult with the comment's ID, URL, and creation time | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
number | integer | Yes | Issue or pull request number |
body | string | Yes | Comment body (Markdown) |
Parameter schema (JSON)
{
"description": "Parameters for add_issue_comment.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Issue or pull request number",
"title": "Number",
"type": "integer"
},
"body": {
"description": "Comment body (Markdown)",
"title": "Body",
"type": "string"
}
},
"required": [
"owner",
"repo",
"number",
"body"
],
"title": "AddIssueCommentParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of add_issue_comment.",
"properties": {
"id": {
"default": 0,
"title": "Id",
"type": "integer"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
}
},
"title": "AddIssueCommentResult",
"type": "object"
} # add_issue_to_project write
Add an issue or pull request to a GitHub Project (v2).
Full description
Add an issue or pull request to a GitHub Project (v2).
Parameters:
project_id: Project node ID from list_projects (required)
content_id: Issue or PR node ID from get_issue/get_pull_request (required)
Returns:
AddIssueToProjectResult with the created project item ID | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project node ID |
content_id | string | Yes | Issue or PR node ID (node_id from get_issue or get_pull_request) |
Parameter schema (JSON)
{
"description": "Parameters for add_issue_to_project.",
"properties": {
"project_id": {
"description": "Project node ID",
"title": "Project Id",
"type": "string"
},
"content_id": {
"description": "Issue or PR node ID (node_id from get_issue or get_pull_request)",
"title": "Content Id",
"type": "string"
}
},
"required": [
"project_id",
"content_id"
],
"title": "AddIssueToProjectParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of add_issue_to_project.",
"properties": {
"item_id": {
"default": "",
"description": "The created project item ID",
"title": "Item Id",
"type": "string"
}
},
"title": "AddIssueToProjectResult",
"type": "object"
} # check_permission read
Check a user's permission level for a repository.
Full description
Check a user's permission level for a repository.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
username: GitHub username to check (required)
Returns:
CheckPermissionResult with:
- permission: Permission level ('admin', 'write', 'read', or 'none')
- role_name: Role name
- user: Username checked | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
username | string | Yes | GitHub username to check |
Parameter schema (JSON)
{
"description": "Parameters for check_permission.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"username": {
"description": "GitHub username to check",
"title": "Username",
"type": "string"
}
},
"required": [
"owner",
"repo",
"username"
],
"title": "CheckPermissionParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of check_permission.",
"properties": {
"permission": {
"default": "",
"description": "Permission level: 'admin', 'write', 'read', or 'none'",
"title": "Permission",
"type": "string"
},
"role_name": {
"default": "",
"title": "Role Name",
"type": "string"
},
"user": {
"default": "",
"title": "User",
"type": "string"
}
},
"title": "CheckPermissionResult",
"type": "object"
} # create_issue write
Create a new issue in a GitHub repository.
Full description
Create a new issue in a GitHub repository.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
title: Issue title (required)
body: Issue body in Markdown (optional)
assignees: List of usernames to assign (optional)
labels: List of label names (optional)
milestone: Milestone number (optional)
Returns:
CreateIssueResult with the created issue's number and URL | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
title | string | Yes | Issue title |
body | string | null | No | Issue body (Markdown) |
assignees | array<string> | null | No | List of usernames to assign |
labels | array<string> | null | No | List of label names |
milestone | integer | null | No | Milestone number |
Parameter schema (JSON)
{
"description": "Parameters for create_issue.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"title": {
"description": "Issue title",
"title": "Title",
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Issue body (Markdown)",
"title": "Body"
},
"assignees": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of usernames to assign",
"title": "Assignees"
},
"labels": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of label names",
"title": "Labels"
},
"milestone": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Milestone number",
"title": "Milestone"
}
},
"required": [
"owner",
"repo",
"title"
],
"title": "CreateIssueParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_issue.",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"node_id": {
"default": "",
"title": "Node Id",
"type": "string"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "CreateIssueResult",
"type": "object"
} # create_label write
Create a new label in a GitHub repository.
Full description
Create a new label in a GitHub repository.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
name: Label name (required)
color: Label color hex code without '#' (required, e.g. 'ff0000')
description: Label description (optional)
Returns:
CreateLabelResult with the created label's name, color, and description | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
name | string | Yes | Label name |
color | string | Yes | Label color hex code (without #) |
description | string | null | No | Label description |
Parameter schema (JSON)
{
"description": "Parameters for create_label.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"name": {
"description": "Label name",
"title": "Name",
"type": "string"
},
"color": {
"description": "Label color hex code (without #)",
"title": "Color",
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Label description",
"title": "Description"
}
},
"required": [
"owner",
"repo",
"name",
"color"
],
"title": "CreateLabelParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_label.",
"properties": {
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"color": {
"default": "",
"title": "Color",
"type": "string"
},
"description": {
"default": "",
"title": "Description",
"type": "string"
}
},
"title": "CreateLabelResult",
"type": "object"
} # create_pull_request write
Create a new pull request.
Full description
Create a new pull request.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
title: Pull request title (required)
head: Branch containing changes, or 'user:branch' for cross-repo (required)
base: Branch to merge into (required)
body: PR description in Markdown (optional)
draft: Create as draft PR (default false)
Returns:
CreatePullRequestResult with the created PR's number and URL | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
title | string | Yes | Pull request title |
head | string | Yes | Branch containing changes (or 'user:branch' for cross-repo) |
base | string | Yes | Branch to merge into |
body | string | null | No | PR description (Markdown) |
draft | boolean | No | Create as draft PR Default: false |
Parameter schema (JSON)
{
"description": "Parameters for create_pull_request.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"title": {
"description": "Pull request title",
"title": "Title",
"type": "string"
},
"head": {
"description": "Branch containing changes (or 'user:branch' for cross-repo)",
"title": "Head",
"type": "string"
},
"base": {
"description": "Branch to merge into",
"title": "Base",
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "PR description (Markdown)",
"title": "Body"
},
"draft": {
"default": false,
"description": "Create as draft PR",
"title": "Draft",
"type": "boolean"
}
},
"required": [
"owner",
"repo",
"title",
"head",
"base"
],
"title": "CreatePullRequestParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_pull_request.",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"node_id": {
"default": "",
"title": "Node Id",
"type": "string"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "CreatePullRequestResult",
"type": "object"
} # create_review write
Create a review on a pull request.
Full description
Create a review on a pull request.
Submit a review with an event type of APPROVE, REQUEST_CHANGES, or COMMENT.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Pull request number (required)
event: Review action - 'APPROVE', 'REQUEST_CHANGES', or 'COMMENT' (required)
body: Review body text (optional, required for REQUEST_CHANGES)
Returns:
CreateReviewResult with the review's ID, state, and URL | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
number | integer | Yes | Pull request number |
event | string | Yes | Review action: 'APPROVE', 'REQUEST_CHANGES', or 'COMMENT' |
body | string | null | No | Review body text |
Parameter schema (JSON)
{
"description": "Parameters for create_review.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Pull request number",
"title": "Number",
"type": "integer"
},
"event": {
"description": "Review action: 'APPROVE', 'REQUEST_CHANGES', or 'COMMENT'",
"title": "Event",
"type": "string"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Review body text",
"title": "Body"
}
},
"required": [
"owner",
"repo",
"number",
"event"
],
"title": "CreateReviewParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of create_review.",
"properties": {
"id": {
"default": 0,
"title": "Id",
"type": "integer"
},
"state": {
"default": "",
"title": "State",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "CreateReviewResult",
"type": "object"
} # delete_label write
Delete a label from a GitHub repository.
Full description
Delete a label from a GitHub repository.
Deleting a label automatically removes it from all issues and pull
requests that had it. The label name is URL-encoded to handle special
characters.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
name: Label name to delete (required)
Returns:
DeleteLabelResult with deleted=True on success and the deleted label name | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
name | string | Yes | Label name to delete |
Parameter schema (JSON)
{
"description": "Parameters for delete_label.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"name": {
"description": "Label name to delete",
"title": "Name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"name"
],
"title": "DeleteLabelParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of delete_label.",
"properties": {
"deleted": {
"default": false,
"title": "Deleted",
"type": "boolean"
},
"name": {
"default": "",
"title": "Name",
"type": "string"
}
},
"title": "DeleteLabelResult",
"type": "object"
} # get_file_contents read
Get the contents of a file from a GitHub repository.
Full description
Get the contents of a file from a GitHub repository.
Retrieves the file and decodes its base64 content. Content is truncated
at 1 MB to prevent oversized responses.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
path: File path within the repository (required)
ref: Branch, tag, or commit SHA (optional, defaults to default branch)
Returns:
GetFileContentsResult with:
- content: Decoded file content as text
- content_truncated: Whether the content was truncated
- sha: File blob SHA | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
path | string | Yes | File path within the repository |
ref | string | null | No | Branch, tag, or commit SHA (defaults to default branch) |
Parameter schema (JSON)
{
"description": "Parameters for get_file_contents.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"path": {
"description": "File path within the repository",
"title": "Path",
"type": "string"
},
"ref": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Branch, tag, or commit SHA (defaults to default branch)",
"title": "Ref"
}
},
"required": [
"owner",
"repo",
"path"
],
"title": "GetFileContentsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_file_contents.",
"properties": {
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"path": {
"default": "",
"title": "Path",
"type": "string"
},
"sha": {
"default": "",
"title": "Sha",
"type": "string"
},
"size": {
"default": 0,
"title": "Size",
"type": "integer"
},
"content": {
"default": "",
"description": "Decoded file content (text)",
"title": "Content",
"type": "string"
},
"content_truncated": {
"default": false,
"title": "Content Truncated",
"type": "boolean"
},
"encoding": {
"default": "",
"title": "Encoding",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "GetFileContentsResult",
"type": "object"
} # get_issue read
Get a single GitHub issue with full details.
Full description
Get a single GitHub issue with full details.
Retrieves the complete issue including body text, labels, assignees,
and milestone. Body is truncated at 2000 characters if too long.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Issue number (required)
Returns:
GetIssueResult with full issue details including:
- node_id: GraphQL node ID (useful for Projects v2 mutations)
- body: Issue body text (Markdown), truncated at 2000 chars
- All metadata: labels, assignees, milestone, timestamps | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
number | integer | Yes | Issue number |
Parameter schema (JSON)
{
"description": "Parameters for get_issue.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Issue number",
"title": "Number",
"type": "integer"
}
},
"required": [
"owner",
"repo",
"number"
],
"title": "GetIssueParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_issue with full details.",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"node_id": {
"default": "",
"description": "GraphQL node ID for this issue",
"title": "Node Id",
"type": "string"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"state": {
"default": "",
"title": "State",
"type": "string"
},
"user": {
"default": "",
"description": "Author username",
"title": "User",
"type": "string"
},
"assignees": {
"items": {
"type": "string"
},
"title": "Assignees",
"type": "array"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"milestone": {
"default": "",
"description": "Milestone title",
"title": "Milestone",
"type": "string"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"closed_at": {
"default": "",
"title": "Closed At",
"type": "string"
},
"comments": {
"default": 0,
"title": "Comments",
"type": "integer"
},
"body": {
"default": "",
"title": "Body",
"type": "string"
},
"body_truncated": {
"default": false,
"title": "Body Truncated",
"type": "boolean"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "GetIssueResult",
"type": "object"
} # get_project_items read
Get items in a GitHub Project (v2) with their field values.
Full description
Get items in a GitHub Project (v2) with their field values.
Supports pagination for large projects.
Parameters:
project_id: Project node ID from list_projects (required)
first: Number of items to return, 1-100 (default 50)
after: Cursor for pagination (optional)
Returns:
GetProjectItemsResult with:
- items: List of project items with content info and field values
- has_next_page: Whether more items exist
- end_cursor: Cursor for next page | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project node ID (from list_projects) |
first | integer | No | Number of items to return Default: 50 |
after | string | null | No | Cursor for pagination |
Parameter schema (JSON)
{
"description": "Parameters for get_project_items.",
"properties": {
"project_id": {
"description": "Project node ID (from list_projects)",
"title": "Project Id",
"type": "string"
},
"first": {
"default": 50,
"description": "Number of items to return",
"maximum": 100,
"minimum": 1,
"title": "First",
"type": "integer"
},
"after": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Cursor for pagination",
"title": "After"
}
},
"required": [
"project_id"
],
"title": "GetProjectItemsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"ProjectItem": {
"description": "An item in a GitHub Project v2.",
"properties": {
"id": {
"default": "",
"description": "Project item ID",
"title": "Id",
"type": "string"
},
"content_type": {
"default": "",
"description": "Type: 'Issue', 'PullRequest', or 'DraftIssue'",
"title": "Content Type",
"type": "string"
},
"content_title": {
"default": "",
"title": "Content Title",
"type": "string"
},
"content_number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Content Number"
},
"content_url": {
"default": "",
"title": "Content Url",
"type": "string"
},
"content_state": {
"default": "",
"title": "Content State",
"type": "string"
},
"field_values": {
"items": {
"$ref": "#/$defs/ProjectItemFieldValue"
},
"title": "Field Values",
"type": "array"
}
},
"title": "ProjectItem",
"type": "object"
},
"ProjectItemFieldValue": {
"description": "A field value on a project item.",
"properties": {
"field_name": {
"default": "",
"title": "Field Name",
"type": "string"
},
"value": {
"default": "",
"title": "Value",
"type": "string"
}
},
"title": "ProjectItemFieldValue",
"type": "object"
}
},
"description": "Result of get_project_items.",
"properties": {
"items": {
"items": {
"$ref": "#/$defs/ProjectItem"
},
"title": "Items",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
},
"has_next_page": {
"default": false,
"title": "Has Next Page",
"type": "boolean"
},
"end_cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Cursor"
}
},
"title": "GetProjectItemsResult",
"type": "object"
} # get_pull_request read
Get a single pull request with full details.
Full description
Get a single pull request with full details.
Retrieves the complete PR including body text, merge status, review
stats, and diff stats. Body is truncated at 2000 characters if too long.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Pull request number (required)
Returns:
GetPullRequestResult with full PR details including:
- node_id: GraphQL node ID
- body: PR description (Markdown), truncated at 2000 chars
- Merge info: mergeable, merged, merged_by, merge commit SHA
- Diff stats: commits, additions, deletions, changed_files | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
number | integer | Yes | Pull request number |
Parameter schema (JSON)
{
"description": "Parameters for get_pull_request.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Pull request number",
"title": "Number",
"type": "integer"
}
},
"required": [
"owner",
"repo",
"number"
],
"title": "GetPullRequestParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_pull_request with full details.",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"node_id": {
"default": "",
"description": "GraphQL node ID for this PR",
"title": "Node Id",
"type": "string"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"state": {
"default": "",
"title": "State",
"type": "string"
},
"user": {
"default": "",
"description": "Author username",
"title": "User",
"type": "string"
},
"head_ref": {
"default": "",
"description": "Head branch name",
"title": "Head Ref",
"type": "string"
},
"head_sha": {
"default": "",
"description": "Head branch SHA",
"title": "Head Sha",
"type": "string"
},
"base_ref": {
"default": "",
"description": "Base branch name",
"title": "Base Ref",
"type": "string"
},
"draft": {
"default": false,
"title": "Draft",
"type": "boolean"
},
"mergeable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether PR can be merged",
"title": "Mergeable"
},
"merged": {
"default": false,
"title": "Merged",
"type": "boolean"
},
"merged_by": {
"default": "",
"description": "Username who merged",
"title": "Merged By",
"type": "string"
},
"assignees": {
"items": {
"type": "string"
},
"title": "Assignees",
"type": "array"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"milestone": {
"default": "",
"description": "Milestone title",
"title": "Milestone",
"type": "string"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"closed_at": {
"default": "",
"title": "Closed At",
"type": "string"
},
"merged_at": {
"default": "",
"title": "Merged At",
"type": "string"
},
"commits": {
"default": 0,
"title": "Commits",
"type": "integer"
},
"additions": {
"default": 0,
"title": "Additions",
"type": "integer"
},
"deletions": {
"default": 0,
"title": "Deletions",
"type": "integer"
},
"changed_files": {
"default": 0,
"title": "Changed Files",
"type": "integer"
},
"comments": {
"default": 0,
"title": "Comments",
"type": "integer"
},
"review_comments": {
"default": 0,
"title": "Review Comments",
"type": "integer"
},
"body": {
"default": "",
"title": "Body",
"type": "string"
},
"body_truncated": {
"default": false,
"title": "Body Truncated",
"type": "boolean"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "GetPullRequestResult",
"type": "object"
} # get_repository read
Get repository information.
Full description
Get repository information.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
Returns:
GetRepositoryResult with repository metadata including:
- description, language, default branch
- Stats: stars, forks, open issues
- Settings: private, fork, archived, has_issues, etc. | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
Parameter schema (JSON)
{
"description": "Parameters for get_repository.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
}
},
"required": [
"owner",
"repo"
],
"title": "GetRepositoryParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_repository.",
"properties": {
"full_name": {
"default": "",
"title": "Full Name",
"type": "string"
},
"description": {
"default": "",
"title": "Description",
"type": "string"
},
"private": {
"default": false,
"title": "Private",
"type": "boolean"
},
"fork": {
"default": false,
"title": "Fork",
"type": "boolean"
},
"default_branch": {
"default": "",
"title": "Default Branch",
"type": "string"
},
"language": {
"default": "",
"title": "Language",
"type": "string"
},
"stargazers_count": {
"default": 0,
"title": "Stargazers Count",
"type": "integer"
},
"forks_count": {
"default": 0,
"title": "Forks Count",
"type": "integer"
},
"open_issues_count": {
"default": 0,
"title": "Open Issues Count",
"type": "integer"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
},
"topics": {
"items": {
"type": "string"
},
"title": "Topics",
"type": "array"
},
"has_issues": {
"default": true,
"title": "Has Issues",
"type": "boolean"
},
"has_projects": {
"default": true,
"title": "Has Projects",
"type": "boolean"
},
"has_wiki": {
"default": true,
"title": "Has Wiki",
"type": "boolean"
},
"archived": {
"default": false,
"title": "Archived",
"type": "boolean"
}
},
"title": "GetRepositoryResult",
"type": "object"
} # get_user_permissions read
Return the OAuth scopes and profile info for the user's GitHub connection.
Full description
Return the OAuth scopes and profile info for the user's GitHub connection.
Retrieves granted scopes from the token exchange and calls the GitHub API
to get the user's login, name, and email.
Parameters:
None - This tool takes no parameters.
Returns:
GetUserPermissionsResult with:
- login: GitHub username
- name: Display name
- email: Public email address
- scopes: List of granted OAuth scopes
Errors:
ProviderError: User has not connected GitHub or token is invalid/expired No parameters.
Parameter schema (JSON)
{
"description": "Parameters for get_user_permissions (none required).",
"properties": {},
"title": "GetUserPermissionsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of get_user_permissions.",
"properties": {
"login": {
"default": "",
"description": "GitHub username",
"title": "Login",
"type": "string"
},
"name": {
"default": "",
"description": "User's display name",
"title": "Name",
"type": "string"
},
"email": {
"default": "",
"description": "User's public email",
"title": "Email",
"type": "string"
},
"scopes": {
"description": "Granted OAuth scopes",
"items": {
"type": "string"
},
"title": "Scopes",
"type": "array"
}
},
"title": "GetUserPermissionsResult",
"type": "object"
} # list_branches read
List branches in a GitHub repository.
Full description
List branches in a GitHub repository.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListBranchesResult with:
- branches: List of branch info with name, SHA, and protection status
- result_count: Number of branches returned | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_branches.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"required": [
"owner",
"repo"
],
"title": "ListBranchesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"BranchInfo": {
"description": "GitHub branch information.",
"properties": {
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"sha": {
"default": "",
"description": "HEAD commit SHA",
"title": "Sha",
"type": "string"
},
"protected": {
"default": false,
"title": "Protected",
"type": "boolean"
}
},
"title": "BranchInfo",
"type": "object"
}
},
"description": "Result of list_branches.",
"properties": {
"branches": {
"items": {
"$ref": "#/$defs/BranchInfo"
},
"title": "Branches",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
}
},
"title": "ListBranchesResult",
"type": "object"
} # list_collaborators read
List collaborators for a GitHub repository.
Full description
List collaborators for a GitHub repository.
Requires push access to the repository.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListCollaboratorsResult with:
- collaborators: List of collaborator info with login, role, and permissions
- result_count: Number of collaborators returned | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_collaborators.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"required": [
"owner",
"repo"
],
"title": "ListCollaboratorsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"CollaboratorInfo": {
"description": "GitHub collaborator information.",
"properties": {
"login": {
"default": "",
"title": "Login",
"type": "string"
},
"role_name": {
"default": "",
"description": "Permission level",
"title": "Role Name",
"type": "string"
},
"permissions": {
"additionalProperties": {
"type": "boolean"
},
"title": "Permissions",
"type": "object"
}
},
"title": "CollaboratorInfo",
"type": "object"
}
},
"description": "Result of list_collaborators.",
"properties": {
"collaborators": {
"items": {
"$ref": "#/$defs/CollaboratorInfo"
},
"title": "Collaborators",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
}
},
"title": "ListCollaboratorsResult",
"type": "object"
} # list_issue_comments read
List comments on a GitHub issue or pull request.
Full description
List comments on a GitHub issue or pull request.
Returns comments with author, timestamps, and body text.
Comment bodies are truncated at 2000 characters if too long.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Issue or pull request number (required)
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListIssueCommentsResult with:
- comments: List of comment summaries
- result_count: Number of comments returned | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner (user or organization) |
repo | string | Yes | Repository name |
number | integer | Yes | Issue or pull request number |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_issue_comments.",
"properties": {
"owner": {
"description": "Repository owner (user or organization)",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Issue or pull request number",
"title": "Number",
"type": "integer"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"required": [
"owner",
"repo",
"number"
],
"title": "ListIssueCommentsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"IssueCommentSummary": {
"description": "Summary of a GitHub issue comment.",
"properties": {
"id": {
"default": 0,
"title": "Id",
"type": "integer"
},
"user": {
"default": "",
"description": "Comment author username",
"title": "User",
"type": "string"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"body": {
"default": "",
"title": "Body",
"type": "string"
},
"body_truncated": {
"default": false,
"title": "Body Truncated",
"type": "boolean"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "IssueCommentSummary",
"type": "object"
}
},
"description": "Result of list_issue_comments.",
"properties": {
"comments": {
"items": {
"$ref": "#/$defs/IssueCommentSummary"
},
"title": "Comments",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
}
},
"title": "ListIssueCommentsResult",
"type": "object"
} # list_issues read
List issues in a GitHub repository.
Full description
List issues in a GitHub repository.
Returns issue summaries (without bodies). Filters out pull requests
(GitHub's issues endpoint also returns PRs).
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
state: Filter by state - 'open', 'closed', or 'all' (default 'open')
labels: Comma-separated label names to filter by
assignee: Filter by assignee username, or 'none'/'*'
sort: Sort by 'created', 'updated', or 'comments' (default 'created')
direction: Sort direction 'asc' or 'desc' (default 'desc')
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListIssuesResult with:
- issues: List of issue summaries
- result_count: Number of issues returned | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner (user or organization) |
repo | string | Yes | Repository name |
state | string | No | Filter by state: 'open', 'closed', or 'all' Default: "open" |
labels | string | null | No | Comma-separated list of label names to filter by |
assignee | string | null | No | Filter by assignee username, or 'none'/'*' |
sort | string | No | Sort by: 'created', 'updated', or 'comments' Default: "created" |
direction | string | No | Sort direction: 'asc' or 'desc' Default: "desc" |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_issues.",
"properties": {
"owner": {
"description": "Repository owner (user or organization)",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"state": {
"default": "open",
"description": "Filter by state: 'open', 'closed', or 'all'",
"title": "State",
"type": "string"
},
"labels": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Comma-separated list of label names to filter by",
"title": "Labels"
},
"assignee": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Filter by assignee username, or 'none'/'*'",
"title": "Assignee"
},
"sort": {
"default": "created",
"description": "Sort by: 'created', 'updated', or 'comments'",
"title": "Sort",
"type": "string"
},
"direction": {
"default": "desc",
"description": "Sort direction: 'asc' or 'desc'",
"title": "Direction",
"type": "string"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"required": [
"owner",
"repo"
],
"title": "ListIssuesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"IssueSummary": {
"description": "Summary of a GitHub issue (no body).",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"state": {
"default": "",
"title": "State",
"type": "string"
},
"user": {
"default": "",
"description": "Author username",
"title": "User",
"type": "string"
},
"assignees": {
"items": {
"type": "string"
},
"title": "Assignees",
"type": "array"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"comments": {
"default": 0,
"title": "Comments",
"type": "integer"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "IssueSummary",
"type": "object"
}
},
"description": "Result of list_issues.",
"properties": {
"issues": {
"items": {
"$ref": "#/$defs/IssueSummary"
},
"title": "Issues",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
}
},
"title": "ListIssuesResult",
"type": "object"
} # list_labels read
List labels in a GitHub repository.
Full description
List labels in a GitHub repository.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListLabelsResult with:
- labels: List of label info with name, color, and description
- result_count: Number of labels returned | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_labels.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"required": [
"owner",
"repo"
],
"title": "ListLabelsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"LabelInfo": {
"description": "GitHub label information.",
"properties": {
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"color": {
"default": "",
"title": "Color",
"type": "string"
},
"description": {
"default": "",
"title": "Description",
"type": "string"
}
},
"title": "LabelInfo",
"type": "object"
}
},
"description": "Result of list_labels.",
"properties": {
"labels": {
"items": {
"$ref": "#/$defs/LabelInfo"
},
"title": "Labels",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
}
},
"title": "ListLabelsResult",
"type": "object"
} # list_projects read
List GitHub Projects (v2) for an organization or user.
Full description
List GitHub Projects (v2) for an organization or user.
Returns project summaries with field definitions, which are needed
for update_project_field calls.
Parameters:
owner: Organization or user name (required)
is_org: True if owner is an organization, False for user (default True)
first: Number of projects to return, 1-100 (default 20)
after: Cursor for pagination (optional)
Returns:
ListProjectsResult with:
- projects: List of project summaries with field definitions
- has_next_page: Whether more projects exist
- end_cursor: Cursor for next page | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Organization or user name |
is_org | boolean | No | True if owner is an organization, False for user Default: true |
first | integer | No | Number of projects to return Default: 20 |
after | string | null | No | Cursor for pagination |
Parameter schema (JSON)
{
"description": "Parameters for list_projects.",
"properties": {
"owner": {
"description": "Organization or user name",
"title": "Owner",
"type": "string"
},
"is_org": {
"default": true,
"description": "True if owner is an organization, False for user",
"title": "Is Org",
"type": "boolean"
},
"first": {
"default": 20,
"description": "Number of projects to return",
"maximum": 100,
"minimum": 1,
"title": "First",
"type": "integer"
},
"after": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Cursor for pagination",
"title": "After"
}
},
"required": [
"owner"
],
"title": "ListProjectsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"ProjectFieldInfo": {
"description": "A field definition in a GitHub Project.",
"properties": {
"id": {
"default": "",
"title": "Id",
"type": "string"
},
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"data_type": {
"default": "",
"description": "Field type: TEXT, NUMBER, DATE, SINGLE_SELECT, ITERATION",
"title": "Data Type",
"type": "string"
},
"options": {
"description": "Options for SINGLE_SELECT fields",
"items": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"title": "Options",
"type": "array"
}
},
"title": "ProjectFieldInfo",
"type": "object"
},
"ProjectSummary": {
"description": "Summary of a GitHub Project v2.",
"properties": {
"id": {
"default": "",
"description": "Project node ID",
"title": "Id",
"type": "string"
},
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"short_description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Short Description"
},
"url": {
"default": "",
"title": "Url",
"type": "string"
},
"closed": {
"default": false,
"title": "Closed",
"type": "boolean"
},
"fields": {
"items": {
"$ref": "#/$defs/ProjectFieldInfo"
},
"title": "Fields",
"type": "array"
}
},
"title": "ProjectSummary",
"type": "object"
}
},
"description": "Result of list_projects.",
"properties": {
"projects": {
"items": {
"$ref": "#/$defs/ProjectSummary"
},
"title": "Projects",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
},
"has_next_page": {
"default": false,
"title": "Has Next Page",
"type": "boolean"
},
"end_cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Cursor"
}
},
"title": "ListProjectsResult",
"type": "object"
} # list_pull_requests read
List pull requests in a GitHub repository.
Full description
List pull requests in a GitHub repository.
Returns PR summaries (without bodies).
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
state: Filter by state - 'open', 'closed', or 'all' (default 'open')
head: Filter by head branch (format: 'user:branch')
base: Filter by base branch name
sort: Sort by 'created', 'updated', or 'popularity' (default 'created')
direction: Sort direction 'asc' or 'desc' (default 'desc')
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListPullRequestsResult with:
- pull_requests: List of PR summaries
- result_count: Number of PRs returned | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
state | string | No | Filter by state: 'open', 'closed', or 'all' Default: "open" |
head | string | null | No | Filter by head branch (format: 'user:branch') |
base | string | null | No | Filter by base branch name |
sort | string | No | Sort by: 'created', 'updated', or 'popularity' Default: "created" |
direction | string | No | Sort direction: 'asc' or 'desc' Default: "desc" |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_pull_requests.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"state": {
"default": "open",
"description": "Filter by state: 'open', 'closed', or 'all'",
"title": "State",
"type": "string"
},
"head": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Filter by head branch (format: 'user:branch')",
"title": "Head"
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Filter by base branch name",
"title": "Base"
},
"sort": {
"default": "created",
"description": "Sort by: 'created', 'updated', or 'popularity'",
"title": "Sort",
"type": "string"
},
"direction": {
"default": "desc",
"description": "Sort direction: 'asc' or 'desc'",
"title": "Direction",
"type": "string"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"required": [
"owner",
"repo"
],
"title": "ListPullRequestsParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"PullRequestSummary": {
"description": "Summary of a pull request (no body).",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"state": {
"default": "",
"title": "State",
"type": "string"
},
"user": {
"default": "",
"description": "Author username",
"title": "User",
"type": "string"
},
"head_ref": {
"default": "",
"description": "Head branch name",
"title": "Head Ref",
"type": "string"
},
"base_ref": {
"default": "",
"description": "Base branch name",
"title": "Base Ref",
"type": "string"
},
"draft": {
"default": false,
"title": "Draft",
"type": "boolean"
},
"created_at": {
"default": "",
"title": "Created At",
"type": "string"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "PullRequestSummary",
"type": "object"
}
},
"description": "Result of list_pull_requests.",
"properties": {
"pull_requests": {
"items": {
"$ref": "#/$defs/PullRequestSummary"
},
"title": "Pull Requests",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
}
},
"title": "ListPullRequestsResult",
"type": "object"
} # list_repositories read
List repositories for the authenticated user or a specific user/organization.
Full description
List repositories for the authenticated user or a specific user/organization.
Useful for discovering repos before performing operations that require a repo name.
Parameters:
owner: Username or org name. If null, returns authenticated user's repos
owner_type: 'user' or 'org' (default 'user')
visibility: Filter by visibility - 'all', 'public', or 'private' (default 'all')
sort: Sort by 'created', 'updated', 'pushed', or 'full_name' (default 'updated')
direction: Sort direction 'asc' or 'desc' (default 'desc')
per_page: Results per page, 1-100 (default 30)
page: Page number (default 1)
Returns:
ListRepositoriesResult with:
- repositories: List of repo summaries
- result_count: Number of repos returned
- has_more: Whether more pages exist | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | null | No | Username or org name. If null, returns authenticated user's repos |
owner_type | string | No | Type of owner: 'user' or 'org' Default: "user" |
visibility | string | No | Filter by visibility: 'all', 'public', or 'private' Default: "all" |
sort | string | No | Sort by: 'created', 'updated', 'pushed', or 'full_name' Default: "updated" |
direction | string | No | Sort direction: 'asc' or 'desc' Default: "desc" |
per_page | integer | No | Results per page (1-100) Default: 30 |
page | integer | No | Page number Default: 1 |
Parameter schema (JSON)
{
"description": "Parameters for list_repositories.",
"properties": {
"owner": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Username or org name. If null, returns authenticated user's repos",
"title": "Owner"
},
"owner_type": {
"default": "user",
"description": "Type of owner: 'user' or 'org'",
"title": "Owner Type",
"type": "string"
},
"visibility": {
"default": "all",
"description": "Filter by visibility: 'all', 'public', or 'private'",
"title": "Visibility",
"type": "string"
},
"sort": {
"default": "updated",
"description": "Sort by: 'created', 'updated', 'pushed', or 'full_name'",
"title": "Sort",
"type": "string"
},
"direction": {
"default": "desc",
"description": "Sort direction: 'asc' or 'desc'",
"title": "Direction",
"type": "string"
},
"per_page": {
"default": 30,
"description": "Results per page (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Per Page",
"type": "integer"
},
"page": {
"default": 1,
"description": "Page number",
"minimum": 1,
"title": "Page",
"type": "integer"
}
},
"title": "ListRepositoriesParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"$defs": {
"RepositorySummary": {
"description": "Summary of a GitHub repository.",
"properties": {
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"full_name": {
"default": "",
"title": "Full Name",
"type": "string"
},
"description": {
"default": "",
"title": "Description",
"type": "string"
},
"private": {
"default": false,
"title": "Private",
"type": "boolean"
},
"fork": {
"default": false,
"title": "Fork",
"type": "boolean"
},
"default_branch": {
"default": "",
"title": "Default Branch",
"type": "string"
},
"language": {
"default": "",
"title": "Language",
"type": "string"
},
"stars": {
"default": 0,
"title": "Stars",
"type": "integer"
},
"updated_at": {
"default": "",
"title": "Updated At",
"type": "string"
},
"url": {
"default": "",
"title": "Url",
"type": "string"
}
},
"title": "RepositorySummary",
"type": "object"
}
},
"description": "Result of list_repositories.",
"properties": {
"repositories": {
"items": {
"$ref": "#/$defs/RepositorySummary"
},
"title": "Repositories",
"type": "array"
},
"result_count": {
"default": 0,
"title": "Result Count",
"type": "integer"
},
"has_more": {
"default": false,
"description": "Whether more pages exist",
"title": "Has More",
"type": "boolean"
}
},
"title": "ListRepositoriesResult",
"type": "object"
} # merge_pull_request write
Merge a pull request.
Full description
Merge a pull request.
This is a destructive operation that merges the PR into the base branch.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Pull request number (required)
merge_method: Merge method - 'merge', 'squash', or 'rebase' (default 'merge')
commit_title: Custom merge commit title (optional)
commit_message: Custom merge commit message (optional)
Returns:
MergePullRequestResult with:
- merged: Whether the merge succeeded
- sha: SHA of the merge commit
- message: Status message | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
number | integer | Yes | Pull request number |
merge_method | string | No | Merge method: 'merge', 'squash', or 'rebase' Default: "merge" |
commit_title | string | null | No | Custom merge commit title |
commit_message | string | null | No | Custom merge commit message |
Parameter schema (JSON)
{
"description": "Parameters for merge_pull_request.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Pull request number",
"title": "Number",
"type": "integer"
},
"merge_method": {
"default": "merge",
"description": "Merge method: 'merge', 'squash', or 'rebase'",
"title": "Merge Method",
"type": "string"
},
"commit_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom merge commit title",
"title": "Commit Title"
},
"commit_message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Custom merge commit message",
"title": "Commit Message"
}
},
"required": [
"owner",
"repo",
"number"
],
"title": "MergePullRequestParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of merge_pull_request.",
"properties": {
"merged": {
"default": false,
"title": "Merged",
"type": "boolean"
},
"sha": {
"default": "",
"description": "SHA of the merge commit",
"title": "Sha",
"type": "string"
},
"message": {
"default": "",
"title": "Message",
"type": "string"
}
},
"title": "MergePullRequestResult",
"type": "object"
} # update_issue write
Update an existing GitHub issue.
Full description
Update an existing GitHub issue.
Only the fields you provide will be changed; all others remain unchanged.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
number: Issue number (required)
title: New title (optional)
body: New body in Markdown (optional)
state: New state 'open' or 'closed' (optional)
assignees: Replace assignees list (optional)
labels: Replace labels list (optional)
milestone: Milestone number, or null to clear (optional)
Returns:
UpdateIssueResult with the updated issue's number, title, state, and URL | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
number | integer | Yes | Issue number |
title | string | null | No | New title |
body | string | null | No | New body (Markdown) |
state | string | null | No | New state: 'open' or 'closed' |
assignees | array<string> | null | No | Replace assignees list |
labels | array<string> | null | No | Replace labels list |
milestone | integer | null | No | Milestone number (null to clear) |
Parameter schema (JSON)
{
"description": "Parameters for update_issue.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"number": {
"description": "Issue number",
"title": "Number",
"type": "integer"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New title",
"title": "Title"
},
"body": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New body (Markdown)",
"title": "Body"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New state: 'open' or 'closed'",
"title": "State"
},
"assignees": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Replace assignees list",
"title": "Assignees"
},
"labels": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Replace labels list",
"title": "Labels"
},
"milestone": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Milestone number (null to clear)",
"title": "Milestone"
}
},
"required": [
"owner",
"repo",
"number"
],
"title": "UpdateIssueParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of update_issue.",
"properties": {
"number": {
"default": 0,
"title": "Number",
"type": "integer"
},
"title": {
"default": "",
"title": "Title",
"type": "string"
},
"state": {
"default": "",
"title": "State",
"type": "string"
},
"html_url": {
"default": "",
"title": "Html Url",
"type": "string"
}
},
"title": "UpdateIssueResult",
"type": "object"
} # update_label write
Update an existing label in a GitHub repository.
Full description
Update an existing label in a GitHub repository.
Only the fields you provide will be changed. The label name in the URL
is automatically URL-encoded to handle special characters.
Parameters:
owner: Repository owner (required)
repo: Repository name (required)
name: Current label name (required)
new_name: New label name (optional)
color: New color hex without '#' (optional)
description: New description (optional)
Returns:
UpdateLabelResult with the updated label's name, color, and description | Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Repository owner |
repo | string | Yes | Repository name |
name | string | Yes | Current label name |
new_name | string | null | No | New label name |
color | string | null | No | New color hex (without #) |
description | string | null | No | New description |
Parameter schema (JSON)
{
"description": "Parameters for update_label.",
"properties": {
"owner": {
"description": "Repository owner",
"title": "Owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"title": "Repo",
"type": "string"
},
"name": {
"description": "Current label name",
"title": "Name",
"type": "string"
},
"new_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New label name",
"title": "New Name"
},
"color": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New color hex (without #)",
"title": "Color"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "New description",
"title": "Description"
}
},
"required": [
"owner",
"repo",
"name"
],
"title": "UpdateLabelParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of update_label.",
"properties": {
"name": {
"default": "",
"title": "Name",
"type": "string"
},
"color": {
"default": "",
"title": "Color",
"type": "string"
},
"description": {
"default": "",
"title": "Description",
"type": "string"
}
},
"title": "UpdateLabelResult",
"type": "object"
} # update_project_field write
Update a field value on a project item in a GitHub Project (v2).
Full description
Update a field value on a project item in a GitHub Project (v2).
The value format depends on the field type:
- Text: {"text": "value"}
- Number: {"number": 5}
- Date: {"date": "2024-01-01"}
- Single Select: {"singleSelectOptionId": "option-id"}
- Iteration: {"iterationId": "iteration-id"}
Parameters:
project_id: Project node ID (required)
item_id: Project item ID from get_project_items or add_issue_to_project (required)
field_id: Field ID from list_projects fields (required)
value: Value object matching the field type (required)
Returns:
UpdateProjectFieldResult with the updated project item ID | Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project node ID |
item_id | string | Yes | Project item ID (from get_project_items or add_issue_to_project) |
field_id | string | Yes | Field ID (from list_projects fields) |
value | object | Yes | Value object, e.g. {'text': 'value'}, {'number': 5}, {'singleSelectOptionId': 'option-id'}, {'date': '2024-01-01'}, {'iterationId': 'iteration-id'} |
Parameter schema (JSON)
{
"description": "Parameters for update_project_field.",
"properties": {
"project_id": {
"description": "Project node ID",
"title": "Project Id",
"type": "string"
},
"item_id": {
"description": "Project item ID (from get_project_items or add_issue_to_project)",
"title": "Item Id",
"type": "string"
},
"field_id": {
"description": "Field ID (from list_projects fields)",
"title": "Field Id",
"type": "string"
},
"value": {
"additionalProperties": true,
"description": "Value object, e.g. {'text': 'value'}, {'number': 5}, {'singleSelectOptionId': 'option-id'}, {'date': '2024-01-01'}, {'iterationId': 'iteration-id'}",
"title": "Value",
"type": "object"
}
},
"required": [
"project_id",
"item_id",
"field_id",
"value"
],
"title": "UpdateProjectFieldParams",
"type": "object",
"additionalProperties": false
} Result schema (JSON)
{
"description": "Result of update_project_field.",
"properties": {
"item_id": {
"default": "",
"description": "The updated project item ID",
"title": "Item Id",
"type": "string"
}
},
"title": "UpdateProjectFieldResult",
"type": "object"
}