github-repos-manager-mcp
Version:
Model Context Protocol (MCP) server that enables your MCP client (e.g., Claude Desktop, Cline, Roo Code, Cursor, Windsurf, etc.) to interact with GitHub repositories using your GitHub personal access token.
1,752 lines (1,746 loc) • 82.4 kB
JavaScript
const toolsConfig = {
list_repos: {
name: "list_repos",
description: "List user repositories with pagination and filtering options",
inputSchema: {
type: "object",
properties: {
per_page: {
type: "number",
description: "Number of repositories per page (default: 10)",
default: 10,
},
visibility: {
type: "string",
description: "Repository visibility filter",
enum: ["all", "public", "private"],
default: "all",
},
sort: {
type: "string",
description: "Sort repositories by",
enum: ["created", "updated", "pushed", "full_name"],
default: "updated",
},
},
},
},
get_repo_info: {
name: "get_repo_info",
description: "Get detailed information about a specific repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
},
},
},
search_repos: {
name: "search_repos",
description: "Search for repositories using GitHub's search API",
inputSchema: {
type: "object",
properties: {
query: {
type: "string",
description: "Search query for repositories",
},
per_page: {
type: "number",
description: "Number of results per page (default: 10)",
default: 10,
},
sort: {
type: "string",
description: "Sort results by",
enum: ["stars", "forks", "help-wanted-issues", "updated"],
default: "stars",
},
},
required: ["query"],
},
},
get_repo_contents: {
name: "get_repo_contents",
description: "Get contents of a repository directory or file",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
path: {
type: "string",
description: "Path to directory or file (default: root)",
default: "",
},
ref: {
type: "string",
description: "Branch, tag, or commit SHA (default: default branch)",
},
},
},
},
set_default_repo: {
name: "set_default_repo",
description: "Set a default repository for subsequent operations",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner",
},
repo: {
type: "string",
description: "Repository name",
},
},
required: ["owner", "repo"],
},
},
list_repo_collaborators: {
name: "list_repo_collaborators",
description: "List collaborators for a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
affiliation: {
type: "string",
description: "Filter by affiliation",
enum: ["outside", "direct", "all"],
default: "all",
},
permission: {
type: "string",
description: "Filter by permission level",
enum: ["pull", "triage", "push", "maintain", "admin"],
},
per_page: {
type: "number",
description: "Number of results per page (default: 30)",
default: 30,
},
},
},
},
list_issues: {
name: "list_issues",
description: "List issues in a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
state: {
type: "string",
description: "Issue state",
enum: ["open", "closed", "all"],
default: "open",
},
per_page: {
type: "number",
description: "Number of issues per page (default: 10)",
default: 10,
},
},
},
},
create_issue: {
name: "create_issue",
description: "Create a new issue in a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
title: {
type: "string",
description: "Issue title",
},
body: {
type: "string",
description: "Issue body (optional)",
default: "",
},
labels: {
type: "array",
items: { type: "string" },
description: "Labels to assign to the issue",
default: [],
},
assignees: {
type: "array",
items: { type: "string" },
description: "Usernames to assign to the issue",
default: [],
},
image_path: {
type: "string",
description: "Path to image file to upload and attach to issue",
},
},
required: ["title"],
},
},
edit_issue: {
name: "edit_issue",
description: "Edit an existing issue",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
title: {
type: "string",
description: "New issue title",
},
body: {
type: "string",
description: "New issue body",
},
state: {
type: "string",
description: "Issue state",
enum: ["open", "closed"],
},
labels: {
type: "array",
items: { type: "string" },
description: "Labels to assign to the issue",
},
assignees: {
type: "array",
items: { type: "string" },
description: "Usernames to assign to the issue",
},
image_path: {
type: "string",
description: "Path to image file to upload and append to issue",
},
},
required: ["issue_number"],
},
},
get_issue_details: {
name: "get_issue_details",
description: "Get detailed information about a specific issue",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
},
required: ["issue_number"],
},
},
lock_issue: {
name: "lock_issue",
description: "Lock an issue to prevent further comments",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
lock_reason: {
type: "string",
description: "Reason for locking",
enum: ["off-topic", "too heated", "resolved", "spam"],
},
},
required: ["issue_number"],
},
},
unlock_issue: {
name: "unlock_issue",
description: "Unlock an issue to allow comments",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
},
required: ["issue_number"],
},
},
add_assignees_to_issue: {
name: "add_assignees_to_issue",
description: "Add assignees to an issue",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
assignees: {
type: "array",
items: { type: "string" },
description: "Usernames to assign to the issue",
},
},
required: ["issue_number", "assignees"],
},
},
remove_assignees_from_issue: {
name: "remove_assignees_from_issue",
description: "Remove assignees from an issue",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
assignees: {
type: "array",
items: { type: "string" },
description: "Usernames to remove from the issue",
},
},
required: ["issue_number", "assignees"],
},
},
list_prs: {
name: "list_prs",
description: "List pull requests in a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
state: {
type: "string",
description: "Pull request state",
enum: ["open", "closed", "all"],
default: "open",
},
per_page: {
type: "number",
description: "Number of pull requests per page (default: 10)",
default: 10,
},
},
},
},
get_user_info: {
name: "get_user_info",
description: "Get information about a GitHub user",
inputSchema: {
type: "object",
properties: {
username: {
type: "string",
description:
"GitHub username (optional, defaults to authenticated user)",
},
},
},
},
list_issue_comments: {
name: "list_issue_comments",
description: "List comments on an issue",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
per_page: {
type: "number",
description: "Number of comments per page (default: 30)",
default: 30,
},
since: {
type: "string",
description:
"Only show comments updated after this time (ISO 8601 format)",
},
},
required: ["issue_number"],
},
},
create_issue_comment: {
name: "create_issue_comment",
description: "Create a comment on an issue",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
issue_number: {
type: "number",
description: "Issue number",
},
body: {
type: "string",
description: "Comment body",
},
},
required: ["issue_number", "body"],
},
},
edit_issue_comment: {
name: "edit_issue_comment",
description: "Edit an issue comment",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
comment_id: {
type: "number",
description: "Comment ID",
},
body: {
type: "string",
description: "New comment body",
},
},
required: ["comment_id", "body"],
},
},
delete_issue_comment: {
name: "delete_issue_comment",
description: "Delete an issue comment",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
comment_id: {
type: "number",
description: "Comment ID",
},
},
required: ["comment_id"],
},
},
list_repo_labels: {
name: "list_repo_labels",
description: "List labels in a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
per_page: {
type: "number",
description: "Number of labels per page (default: 30)",
default: 30,
},
},
},
},
create_label: {
name: "create_label",
description: "Create a new label in a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
name: {
type: "string",
description: "Label name",
},
color: {
type: "string",
description: "Label color (6-character hex code, without #)",
default: "f29513",
},
description: {
type: "string",
description: "Label description",
},
},
required: ["name"],
},
},
edit_label: {
name: "edit_label",
description: "Edit an existing label",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
current_name: {
type: "string",
description: "Current label name",
},
name: {
type: "string",
description: "New label name",
},
color: {
type: "string",
description: "New label color (6-character hex code, without #)",
},
description: {
type: "string",
description: "New label description",
},
},
required: ["current_name"],
},
},
delete_label: {
name: "delete_label",
description: "Delete a label from a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
name: {
type: "string",
description: "Label name",
},
},
required: ["name"],
},
},
list_milestones: {
name: "list_milestones",
description: "List milestones in a repository",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
state: {
type: "string",
description: "Milestone state",
enum: ["open", "closed", "all"],
default: "open",
},
sort: {
type: "string",
description: "Sort milestones by",
enum: ["due_on", "completeness"],
default: "due_on",
},
direction: {
type: "string",
description: "Sort direction",
enum: ["asc", "desc"],
default: "asc",
},
per_page: {
type: "number",
description: "Number of milestones per page (default: 30)",
default: 30,
},
},
},
},
create_milestone: {
name: "create_milestone",
description: "Create a new milestone",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
title: {
type: "string",
description: "Milestone title",
},
state: {
type: "string",
description: "Milestone state",
enum: ["open", "closed"],
default: "open",
},
description: {
type: "string",
description: "Milestone description",
},
due_on: {
type: "string",
description: "Due date (ISO 8601 format)",
},
},
required: ["title"],
},
},
edit_milestone: {
name: "edit_milestone",
description: "Edit an existing milestone",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
milestone_number: {
type: "number",
description: "Milestone number",
},
title: {
type: "string",
description: "New milestone title",
},
state: {
type: "string",
description: "New milestone state",
enum: ["open", "closed"],
},
description: {
type: "string",
description: "New milestone description",
},
due_on: {
type: "string",
description: "New due date (ISO 8601 format)",
},
},
required: ["milestone_number"],
},
},
delete_milestone: {
name: "delete_milestone",
description: "Delete a milestone",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
milestone_number: {
type: "number",
description: "Milestone number",
},
},
required: ["milestone_number"],
},
},
// Branch and Commit Management Tools
list_branches: {
name: "list_branches",
description:
"List all branches in a repository with protection status and commit information",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
protected_only: {
type: "boolean",
description: "Show only protected branches",
default: false,
},
per_page: {
type: "number",
description: "Number of branches per page (default: 30)",
default: 30,
},
},
},
},
create_branch: {
name: "create_branch",
description: "Create a new branch from an existing branch or commit",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
branch_name: {
type: "string",
description: "Name of the new branch to create",
},
from_branch: {
type: "string",
description:
"Source branch to create from (default: repository default branch)",
},
},
required: ["branch_name"],
},
},
list_commits: {
name: "list_commits",
description: "List commits in a repository with detailed information",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
sha: {
type: "string",
description: "Branch, tag, or commit SHA to list commits from",
},
per_page: {
type: "number",
description: "Number of commits per page (default: 20)",
default: 20,
},
since: {
type: "string",
description: "ISO 8601 date/time - only commits after this date",
},
until: {
type: "string",
description: "ISO 8601 date/time - only commits before this date",
},
author: {
type: "string",
description: "GitHub username or email - only commits by this author",
},
},
},
},
get_commit_details: {
name: "get_commit_details",
description:
"Get detailed information about a specific commit including files changed",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
commit_sha: {
type: "string",
description: "The SHA of the commit to get details for",
},
},
required: ["commit_sha"],
},
},
compare_commits: {
name: "compare_commits",
description: "Compare two commits or branches to see differences",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
base: {
type: "string",
description: "The base branch or commit SHA to compare from",
},
head: {
type: "string",
description: "The head branch or commit SHA to compare to",
},
},
required: ["base", "head"],
},
},
// File Management Tools
create_file: {
name: "create_file",
description: "Create a new file in a repository.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
path: {
// Corresponds to filePath in handler/service
type: "string",
description:
"Full path of the file to create in the repository (e.g., 'src/new-file.js').",
},
content: {
type: "string",
description:
"Content of the file. For binary files, this should be a base64 encoded string.",
},
message: {
type: "string",
description: "Commit message for creating the file.",
},
branch: {
type: "string",
description:
"The branch name. Default: the repository’s default branch.",
},
is_binary: {
type: "boolean",
description:
"Set to true if the content is base64 encoded binary data. Default: false.",
default: false,
},
},
required: ["path", "content", "message"],
},
},
update_file: {
name: "update_file",
description: "Update an existing file in a repository.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
path: {
// Corresponds to filePath in handler/service
type: "string",
description:
"Full path of the file to update in the repository (e.g., 'src/existing-file.js').",
},
content: {
type: "string",
description:
"New content of the file. For binary files, this should be a base64 encoded string.",
},
message: {
type: "string",
description: "Commit message for updating the file.",
},
sha: {
type: "string",
description: "The blob SHA of the file being replaced.",
},
branch: {
type: "string",
description:
"The branch name. Default: the repository’s default branch.",
},
is_binary: {
type: "boolean",
description:
"Set to true if the content is base64 encoded binary data. Default: false.",
default: false,
},
},
required: ["path", "content", "message", "sha"],
},
},
upload_file: {
name: "upload_file",
description:
"Upload a local file (binary or text) to a repository. Creates or updates the file.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
path_in_repo: {
// Corresponds to filePathInRepo in handler/service
type: "string",
description:
"Full path where the file will be saved in the repository (e.g., 'assets/image.png').",
},
local_file_path: {
type: "string",
description: "Local path to the file to be uploaded.",
},
message: {
type: "string",
description: "Commit message for uploading the file.",
},
branch: {
type: "string",
description:
"The branch name. Default: the repository’s default branch.",
},
},
required: ["path_in_repo", "local_file_path", "message"],
},
},
delete_file: {
name: "delete_file",
description: "Delete a file from a repository.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
path: {
// Corresponds to filePath in handler/service
type: "string",
description:
"Full path of the file to delete in the repository (e.g., 'src/old-file.js').",
},
message: {
type: "string",
description: "Commit message for deleting the file.",
},
sha: {
type: "string",
description: "The blob SHA of the file being deleted.",
},
branch: {
type: "string",
description:
"The branch name. Default: the repository’s default branch.",
},
},
required: ["path", "message", "sha"],
},
},
// Enhanced Pull Request Management Tools
create_pull_request: {
name: "create_pull_request",
description:
"Create new pull requests with title, body, head/base branches.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
title: {
type: "string",
description: "Pull request title",
},
head: {
type: "string",
description:
"The name of the branch where your changes are implemented",
},
base: {
type: "string",
description:
"The name of the branch you want the changes pulled into",
},
body: {
type: "string",
description: "Pull request body (optional)",
},
},
required: ["title", "head", "base"],
},
},
edit_pull_request: {
name: "edit_pull_request",
description: "Modify PR title, body, labels, assignees.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
pull_number: {
type: "number",
description: "Pull request number",
},
title: {
type: "string",
description: "New pull request title",
},
body: {
type: "string",
description: "New pull request body",
},
state: {
type: "string",
description: "Pull request state (e.g., 'open', 'closed')",
enum: ["open", "closed"],
},
base: {
type: "string",
description:
"The name of the branch you want the changes pulled into",
},
maintainer_can_modify: {
type: "boolean",
description: "Whether maintainers can modify the pull request",
},
labels: {
type: "array",
items: { type: "string" },
description: "Labels to assign to the pull request",
},
assignees: {
type: "array",
items: { type: "string" },
description: "Usernames to assign to the pull request",
},
},
required: ["pull_number"],
},
},
get_pr_details: {
name: "get_pr_details",
description: "Get comprehensive PR information with review status.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
pull_number: {
type: "number",
description: "Pull request number",
},
},
required: ["pull_number"],
},
},
list_pr_reviews: {
name: "list_pr_reviews",
description: "List PR reviews and their approval status.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
pull_number: {
type: "number",
description: "Pull request number",
},
per_page: {
type: "number",
description: "Number of reviews per page (default: 30)",
default: 30,
},
page: {
type: "number",
description: "Page number of the results to fetch (default: 1)",
default: 1,
},
},
required: ["pull_number"],
},
},
create_pr_review: {
name: "create_pr_review",
description: "Submit PR reviews with comments and approval/rejection.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
pull_number: {
type: "number",
description: "Pull request number",
},
commit_id: {
type: "string",
description: "The SHA of the commit that needs a review (optional)",
},
body: {
type: "string",
description:
"The body text of the review (optional if event is not COMMENT)",
},
event: {
type: "string",
description:
"The review action ('APPROVE', 'REQUEST_CHANGES', or 'COMMENT')",
enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"],
},
comments: {
type: "array",
description: "Array of review comment objects (optional)",
items: {
type: "object",
properties: {
path: {
type: "string",
description:
"The relative path to the file that necessitates a review comment.",
},
position: {
type: "number",
description:
"The position in the diff where you want to add a review comment.",
},
body: {
type: "string",
description: "Text of the review comment.",
},
},
required: ["path", "position", "body"],
},
},
},
required: ["pull_number", "event"],
},
},
list_pr_files: {
name: "list_pr_files",
description: "List files changed in a PR with diff stats.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
pull_number: {
type: "number",
description: "Pull request number",
},
per_page: {
type: "number",
description: "Number of files per page (default: 30)",
default: 30,
},
page: {
type: "number",
description: "Page number of the results to fetch (default: 1)",
default: 1,
},
},
required: ["pull_number"],
},
},
// Security & Access Management Tools
list_deploy_keys: {
name: "list_deploy_keys",
description: "List repository deploy keys.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
per_page: {
type: "number",
description: "Number of deploy keys per page (default: 30)",
default: 30,
},
},
},
},
create_deploy_key: {
name: "create_deploy_key",
description: "Add new deploy keys.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
title: {
type: "string",
description: "A name for the key.",
},
key: {
type: "string",
description: "The public SSH key.",
},
read_only: {
type: "boolean",
description: "If true, the key will only have read-only access.",
default: false,
},
},
required: ["title", "key"],
},
},
delete_deploy_key: {
name: "delete_deploy_key",
description: "Remove deploy keys.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
key_id: {
type: "number",
description: "The ID of the key to delete.",
},
},
required: ["key_id"],
},
},
list_webhooks: {
name: "list_webhooks",
description: "List repository webhooks.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
per_page: {
type: "number",
description: "Number of webhooks per page (default: 30)",
default: 30,
},
},
},
},
create_webhook: {
name: "create_webhook",
description: "Create event webhooks.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
config: {
type: "object",
description: "Key/value pairs to provide settings for this webhook.",
properties: {
url: {
type: "string",
description: "The URL to which the payloads will be delivered.",
},
content_type: {
type: "string",
description:
"The media type used to serialize the payloads. Supported values include 'json' and 'form'.",
default: "json",
},
secret: {
type: "string",
description:
"If provided, the 'secret' will be used as the 'key' to generate the HMAC hex digest value in the 'X-Hub-Signature-256' header.",
},
insecure_ssl: {
type: ["string", "number"], // Can be "0" or "1" or 0 or 1
description:
"Determines whether the SSL certificate of the host for 'url' will be verified when delivering payloads. Supported values include '0' (SSL certificate is verified) and '1' (SSL certificate is not verified).",
default: "0",
},
},
required: ["url"],
},
events: {
type: "array",
items: { type: "string" },
description: "Determines what events the hook is triggered for.",
default: ["push"],
},
active: {
type: "boolean",
description:
"Determines if notifications are sent when the webhook is triggered.",
default: true,
},
},
required: ["config"],
},
},
edit_webhook: {
name: "edit_webhook",
description: "Modify webhook configurations.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
hook_id: {
type: "number",
description: "The ID of the webhook to update.",
},
config: {
type: "object",
description: "Key/value pairs to provide settings for this webhook.",
properties: {
url: {
type: "string",
description: "The URL to which the payloads will be delivered.",
},
content_type: {
type: "string",
description: "The media type used to serialize the payloads.",
},
secret: {
type: "string",
description:
"If provided, the 'secret' will be used as the 'key' to generate the HMAC hex digest value in the 'X-Hub-Signature-256' header.",
},
insecure_ssl: {
type: ["string", "number"],
description:
"Determines whether the SSL certificate of the host for 'url' will be verified.",
},
},
},
events: {
type: "array",
items: { type: "string" },
description:
"Determines what events the hook is triggered for. This replaces the existing events.",
},
add_events: {
type: "array",
items: { type: "string" },
description:
"Determines a list of events to be added to the list of events that the Hook triggers for.",
},
remove_events: {
type: "array",
items: { type: "string" },
description:
"Determines a list of events to be removed from the list of events that the Hook triggers for.",
},
active: {
type: "boolean",
description:
"Determines if notifications are sent when the webhook is triggered.",
},
},
required: ["hook_id"],
},
},
delete_webhook: {
name: "delete_webhook",
description: "Remove webhooks.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
hook_id: {
type: "number",
description: "The ID of the webhook to delete.",
},
},
required: ["hook_id"],
},
},
list_secrets: {
name: "list_secrets",
description: "List repository secrets (names only).",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
per_page: {
type: "number",
description: "Number of secrets per page (default: 30)",
default: 30,
},
},
},
},
update_secret: {
// This covers create or update
name: "update_secret",
description: "Create or update repository secrets.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
secret_name: {
type: "string",
description: "The name of the secret.",
},
encrypted_value: {
type: "string",
description:
"Value for your secret, encrypted with LibSodium. Required if key_id is provided.",
},
key_id: {
type: "string",
description:
"ID of the key you used to encrypt the secret. Required if encrypted_value is provided.",
},
},
required: ["secret_name", "encrypted_value", "key_id"],
},
},
// GitHub Actions & Workflows Tools
list_workflows: {
name: "list_workflows",
description: "List repository GitHub Actions workflows.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
per_page: {
type: "number",
description: "Number of workflows per page (default: 30)",
default: 30,
},
page: {
type: "number",
description: "Page number of the results to fetch (default: 1)",
default: 1,
},
},
},
},
list_workflow_runs: {
name: "list_workflow_runs",
description: "Get workflow run history with status.",
inputSchema: {
type: "object",
properties: {
owner: {
type: "string",
description: "Repository owner (optional if default repo is set)",
},
repo: {
type: "string",
description: "Repository name (optional if default repo is set)",
},
workflow_id: {
type: ["string", "number"], // Can be workflow file name or ID
description:
"The ID or file name of the workflow (e.g., 'main.yml' or 12345).",
},
actor: {
type: "string",
description: "Returns workflow runs triggered by the actor login.",
},
branch: {
type: "string",
description: "Returns workflow runs associated with a branch.",
},
event: {
type: "string",
description: "Returns workflow run triggered by the event type.",
},
status: {
type: "string",
description: "Returns workflow runs with the specified status.",
enum: [
"completed",
"action_required",
"cancelled",
"failure",
"neutral",
"skipped",
"stale",
"success",
"timed_out",
"in_progress",
"queued",
"requested",
"waiting",
"pending",
],
},
per_page: {
type: "number",
description: "Number of workflow runs per page (default: 30)",
default: 30,
},
page: {
type: "number",
description: "Page number of the results to fetch (default: 1)",
default: 1,
},
created: {
type: "string",
description:
"Returns workflow runs created within the given date-time range. ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS+/-HH:MM. Example: '2023-01-01T00:00:00Z..2023-01-02T00:00:00Z' or '>=2023-01-01T00:00:00Z'",
},
exclude_pull_requests: {
type: "boolean",
description:
"If true, excludes pull requests from the results. Default: false",
default: false,
},
check_suite_id: {
type: "number",
description:
"Returns workflow runs associated with the check_suite_id.",
},
head_sha: {
type: "string",
description:
"Returns workflow runs associated with a head SHA. Only returns the latest run for the SHA.",