Skip to content

Commit bbfc44c

Browse files
authored
adding labels tools (#1193)
* adding labels tools * fixing ci * update toolsnap * fixing lint * changing comment * fix title
1 parent 16b43c9 commit bbfc44c

File tree

8 files changed

+1179
-1
lines changed

8 files changed

+1179
-1
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ The following sets of tools are available (all are on by default):
340340
| `experiments` | Experimental features that are not considered stable yet |
341341
| `gists` | GitHub Gist related tools |
342342
| `issues` | GitHub Issues related tools |
343+
| `labels` | GitHub Labels related tools |
343344
| `notifications` | GitHub Notifications related tools |
344345
| `orgs` | GitHub Organization related tools |
345346
| `projects` | GitHub Projects related tools |
@@ -599,6 +600,11 @@ The following sets of tools are available (all are on by default):
599600
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
600601
- `repo`: Repository name (string, required)
601602

603+
- **get_label** - Get a specific label from a repository.
604+
- `name`: Label name. (string, required)
605+
- `owner`: Repository owner (username or organization name) (string, required)
606+
- `repo`: Repository name (string, required)
607+
602608
- **list_issue_types** - List available issue types
603609
- `owner`: The organization owner of the repository (string, required)
604610

@@ -613,6 +619,11 @@ The following sets of tools are available (all are on by default):
613619
- `since`: Filter by date (ISO 8601 timestamp) (string, optional)
614620
- `state`: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
615621

622+
- **list_label** - List labels from a repository or an issue
623+
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
624+
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
625+
- `repo`: Repository name - required for all operations (string, required)
626+
616627
- **list_sub_issues** - List sub-issues
617628
- `issue_number`: Issue number (number, required)
618629
- `owner`: Repository owner (string, required)
@@ -657,6 +668,40 @@ The following sets of tools are available (all are on by default):
657668
- `title`: New title (string, optional)
658669
- `type`: New issue type (string, optional)
659670

671+
- **write_label** - Write operations on repository labels.
672+
- `color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
673+
- `description`: Label description text. Optional for 'create' and 'update'. (string, optional)
674+
- `method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
675+
- `name`: Label name - required for all operations (string, required)
676+
- `new_name`: New name for the label (used only with 'update' method to rename) (string, optional)
677+
- `owner`: Repository owner (username or organization name) (string, required)
678+
- `repo`: Repository name (string, required)
679+
680+
</details>
681+
682+
<details>
683+
684+
<summary>Labels</summary>
685+
686+
- **get_label** - Get a specific label from a repository.
687+
- `name`: Label name. (string, required)
688+
- `owner`: Repository owner (username or organization name) (string, required)
689+
- `repo`: Repository name (string, required)
690+
691+
- **list_label** - List labels from a repository or an issue
692+
- `issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
693+
- `owner`: Repository owner (username or organization name) - required for all operations (string, required)
694+
- `repo`: Repository name - required for all operations (string, required)
695+
696+
- **write_label** - Write operations on repository labels.
697+
- `color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
698+
- `description`: Label description text. Optional for 'create' and 'update'. (string, optional)
699+
- `method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
700+
- `name`: Label name - required for all operations (string, required)
701+
- `new_name`: New name for the label (used only with 'update' method to rename) (string, optional)
702+
- `owner`: Repository owner (username or organization name) (string, required)
703+
- `repo`: Repository name (string, required)
704+
660705
</details>
661706

662707
<details>

docs/remote-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Below is a table of available toolsets for the remote GitHub MCP Server. Each to
2727
| Experiments | Experimental features that are not considered stable yet | https://api.githubcopilot.com/mcp/x/experiments | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/experiments/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-experiments&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fexperiments%2Freadonly%22%7D) |
2828
| Gists | GitHub Gist related tools | https://api.githubcopilot.com/mcp/x/gists | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-gists&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgists%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/gists/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-gists&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgists%2Freadonly%22%7D) |
2929
| Issues | GitHub Issues related tools | https://api.githubcopilot.com/mcp/x/issues | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-issues&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fissues%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/issues/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-issues&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fissues%2Freadonly%22%7D) |
30+
| Labels | GitHub Labels related tools | https://api.githubcopilot.com/mcp/x/labels | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-labels&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Flabels%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/labels/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-labels&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Flabels%2Freadonly%22%7D) |
3031
| Notifications | GitHub Notifications related tools | https://api.githubcopilot.com/mcp/x/notifications | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-notifications&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fnotifications%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/notifications/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-notifications&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fnotifications%2Freadonly%22%7D) |
3132
| Organizations | GitHub Organization related tools | https://api.githubcopilot.com/mcp/x/orgs | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-orgs&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Forgs%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/orgs/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-orgs&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Forgs%2Freadonly%22%7D) |
3233
| Projects | GitHub Projects related tools | https://api.githubcopilot.com/mcp/x/projects | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-projects&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fprojects%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/projects/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-projects&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fprojects%2Freadonly%22%7D) |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"annotations": {
3+
"title": "Get a specific label from a repository.",
4+
"readOnlyHint": true
5+
},
6+
"description": "Get a specific label from a repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"name": {
10+
"description": "Label name.",
11+
"type": "string"
12+
},
13+
"owner": {
14+
"description": "Repository owner (username or organization name)",
15+
"type": "string"
16+
},
17+
"repo": {
18+
"description": "Repository name",
19+
"type": "string"
20+
}
21+
},
22+
"required": [
23+
"owner",
24+
"repo",
25+
"name"
26+
],
27+
"type": "object"
28+
},
29+
"name": "get_label"
30+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"annotations": {
3+
"title": "List labels from a repository.",
4+
"readOnlyHint": true
5+
},
6+
"description": "List labels from a repository or an issue",
7+
"inputSchema": {
8+
"properties": {
9+
"issue_number": {
10+
"description": "Issue number - if provided, lists labels on the specific issue",
11+
"type": "number"
12+
},
13+
"owner": {
14+
"description": "Repository owner (username or organization name) - required for all operations",
15+
"type": "string"
16+
},
17+
"repo": {
18+
"description": "Repository name - required for all operations",
19+
"type": "string"
20+
}
21+
},
22+
"required": [
23+
"owner",
24+
"repo"
25+
],
26+
"type": "object"
27+
},
28+
"name": "list_label"
29+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"annotations": {
3+
"title": "Write operations on repository labels.",
4+
"readOnlyHint": false
5+
},
6+
"description": "Perform write operations on repository labels. To set labels on issues, use the 'update_issue' tool.",
7+
"inputSchema": {
8+
"properties": {
9+
"color": {
10+
"description": "Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'.",
11+
"type": "string"
12+
},
13+
"description": {
14+
"description": "Label description text. Optional for 'create' and 'update'.",
15+
"type": "string"
16+
},
17+
"method": {
18+
"description": "Operation to perform: 'create', 'update', or 'delete'",
19+
"enum": [
20+
"create",
21+
"update",
22+
"delete"
23+
],
24+
"type": "string"
25+
},
26+
"name": {
27+
"description": "Label name - required for all operations",
28+
"type": "string"
29+
},
30+
"new_name": {
31+
"description": "New name for the label (used only with 'update' method to rename)",
32+
"type": "string"
33+
},
34+
"owner": {
35+
"description": "Repository owner (username or organization name)",
36+
"type": "string"
37+
},
38+
"repo": {
39+
"description": "Repository name",
40+
"type": "string"
41+
}
42+
},
43+
"required": [
44+
"method",
45+
"owner",
46+
"repo",
47+
"name"
48+
],
49+
"type": "object"
50+
},
51+
"name": "write_label"
52+
}

0 commit comments

Comments
 (0)