Skip to content

Commit 62f2da8

Browse files
feat(repos): complete typed repository tool outputs
Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 5e737b4 commit 62f2da8

29 files changed

Lines changed: 11705 additions & 350 deletions

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,10 @@ The following sets of tools are available:
616616

617617
## Tools
618618

619+
Repository tools expose output schemas and typed `structuredContent` to clients using MCP protocol `2026-07-28` or later. Older clients, or clients with an unknown protocol version, receive the existing content without an output schema or structured output.
620+
621+
For `get_file_contents`, directory results (including field projections) are structured arrays. File downloads and metadata-only responses use a `content` array of typed text, embedded-resource, or resource-link blocks, preserving status messages, text, base64 blobs, empty files, and download links. Text-only repository mutations such as starring and deletion also return a structured `message`; fork responses distinguish a repository reference from an in-progress message. Repository deletion still requires its existing confirmation flow before returning a completed result.
622+
619623
The issue metadata (`list_issue_types`, `list_issue_fields`), comment (`add_issue_comment`, `update_issue_comment`), dependency (`issue_dependency_read`, `issue_dependency_write`), and duplicate-detection (`find_duplicate`) tools provide typed `outputSchema` and `structuredContent` for protocol `2026-07-28` and newer. Older or unknown protocol versions retain the same text responses without these fields. Tool errors do not return structured content. Dependency and duplicate-detection tools retain their existing feature gates.
620624

621625
<!-- START AUTOMATED TOOLS -->
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"annotations": {
3+
"idempotentHint": false,
4+
"readOnlyHint": false,
5+
"title": "Create branch"
6+
},
7+
"description": "Create a new branch in a GitHub repository",
8+
"icons": [
9+
{
10+
"mimeType": "image/png",
11+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAABTklEQVRIie2UPUvDUBSGn5PW2qnYwUXExWhNpY2CUKT+BB10E3R0dnbrppuKLgouHbr5X5qlKRIFB+cuguBHj4O05KYfNsVJ+m7n3Hue54ZcrhDKQqGQTX1YVwg7QIbx0gh8b7VTJMMrqS+5RtgD7oDX2GhhC6UcbhkCVLZVuX1sesex4YCdX6uAGgIrsicjlrTGgQ9KVPDnmQgmgongPwgkXNiOq8ADMAtkx4UGvtflJvus20ANeIlN/vW5/kkt8L3D2HD6P9dRgSI8dQcc9w1IR3acBE3vbFSp8ZMVnoFSqJ/unZDe3pAYXyDIJarn9opbDZrewaAh2y7Oy5S1r6h5QG2Xxbw3piDw6xe244oKyxFmC5ihc+tS1qaqngKJyAEBGmZvSGzHVYT790T7aPozsaFoFZGboFGvDJsbOYuOuxuuc7n1uaV8sRSH8Q1DUVLnYLty3gAAAABJRU5ErkJggg==",
12+
"theme": "light"
13+
},
14+
{
15+
"mimeType": "image/png",
16+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA+ElEQVRIie2WLU5DQRRGzwUEirQCQ9BsoSGtZQHgSFgIsg4JXQCGP8V2QCBIEATZkJDgOJi+MJnMo30TFHmfmzvzfeeKyZ2BROpQvVHfrddDmhkZ4BY4Ai6BD7prAowjIoq7i85nFcGNf6qa1tayM1vAvBZQUg74c/WAHtAD/gMgn6YCT8A2MKwOTaZpCfAF3AGvFdlLx7XqdUVw4186rgWeE8Nn4cU67QLNAS/ASG3qmwVPqdaqjWw9A86BK+CkzaTuAseFBse/AiLiQg1gLzs3Bwb8XIp94AxYL/Af2xordap6v/htHKhv6nTlgBUAh9l6Rx11yfgG8ne/zwh2OysAAAAASUVORK5CYII=",
17+
"theme": "dark"
18+
}
19+
],
20+
"inputSchema": {
21+
"properties": {
22+
"branch": {
23+
"description": "Name for new branch",
24+
"type": "string"
25+
},
26+
"from_branch": {
27+
"description": "Source branch (defaults to repo default)",
28+
"type": "string"
29+
},
30+
"owner": {
31+
"description": "Repository owner",
32+
"type": "string",
33+
"x-mcp-header": "owner"
34+
},
35+
"repo": {
36+
"description": "Repository name",
37+
"type": "string",
38+
"x-mcp-header": "repo"
39+
}
40+
},
41+
"required": [
42+
"owner",
43+
"repo",
44+
"branch"
45+
],
46+
"type": "object"
47+
},
48+
"name": "create_branch",
49+
"outputSchema": {
50+
"additionalProperties": false,
51+
"properties": {
52+
"node_id": {
53+
"type": [
54+
"null",
55+
"string"
56+
]
57+
},
58+
"object": {
59+
"additionalProperties": false,
60+
"properties": {
61+
"sha": {
62+
"type": [
63+
"null",
64+
"string"
65+
]
66+
},
67+
"type": {
68+
"type": [
69+
"null",
70+
"string"
71+
]
72+
},
73+
"url": {
74+
"type": [
75+
"null",
76+
"string"
77+
]
78+
}
79+
},
80+
"required": [
81+
"type",
82+
"sha",
83+
"url"
84+
],
85+
"type": [
86+
"null",
87+
"object"
88+
]
89+
},
90+
"ref": {
91+
"type": [
92+
"null",
93+
"string"
94+
]
95+
},
96+
"url": {
97+
"type": [
98+
"null",
99+
"string"
100+
]
101+
}
102+
},
103+
"required": [
104+
"ref",
105+
"url",
106+
"object"
107+
],
108+
"type": "object"
109+
}
110+
}
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"annotations": {
3+
"idempotentHint": false,
4+
"readOnlyHint": false,
5+
"title": "Create or update file"
6+
},
7+
"description": "Create or update a single file in a GitHub repository. \nIf updating, you should provide the SHA of the file you want to update. Use this tool to create or update a file in a GitHub repository remotely; do not use it for local file operations.\n\nTo obtain the current blob SHA before updating, call the get_file_contents tool with the same owner, repo, and path, and set its ref parameter to this tool's branch value. The first text result reports the blob SHA for the requested path.\n\nSHA MUST be provided for existing file updates.\n",
8+
"icons": [
9+
{
10+
"mimeType": "image/png",
11+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAABTklEQVRIie2UPUvDUBSGn5PW2qnYwUXExWhNpY2CUKT+BB10E3R0dnbrppuKLgouHbr5X5qlKRIFB+cuguBHj4O05KYfNsVJ+m7n3Hue54ZcrhDKQqGQTX1YVwg7QIbx0gh8b7VTJMMrqS+5RtgD7oDX2GhhC6UcbhkCVLZVuX1sesex4YCdX6uAGgIrsicjlrTGgQ9KVPDnmQgmgongPwgkXNiOq8ADMAtkx4UGvtflJvus20ANeIlN/vW5/kkt8L3D2HD6P9dRgSI8dQcc9w1IR3acBE3vbFSp8ZMVnoFSqJ/unZDe3pAYXyDIJarn9opbDZrewaAh2y7Oy5S1r6h5QG2Xxbw3piDw6xe244oKyxFmC5ihc+tS1qaqngKJyAEBGmZvSGzHVYT790T7aPozsaFoFZGboFGvDJsbOYuOuxuuc7n1uaV8sRSH8Q1DUVLnYLty3gAAAABJRU5ErkJggg==",
12+
"theme": "light"
13+
},
14+
{
15+
"mimeType": "image/png",
16+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA+ElEQVRIie2WLU5DQRRGzwUEirQCQ9BsoSGtZQHgSFgIsg4JXQCGP8V2QCBIEATZkJDgOJi+MJnMo30TFHmfmzvzfeeKyZ2BROpQvVHfrddDmhkZ4BY4Ai6BD7prAowjIoq7i85nFcGNf6qa1tayM1vAvBZQUg74c/WAHtAD/gMgn6YCT8A2MKwOTaZpCfAF3AGvFdlLx7XqdUVw4186rgWeE8Nn4cU67QLNAS/ASG3qmwVPqdaqjWw9A86BK+CkzaTuAseFBse/AiLiQg1gLzs3Bwb8XIp94AxYL/Af2xordap6v/htHKhv6nTlgBUAh9l6Rx11yfgG8ne/zwh2OysAAAAASUVORK5CYII=",
17+
"theme": "dark"
18+
}
19+
],
20+
"inputSchema": {
21+
"properties": {
22+
"allow_symlink_write": {
23+
"default": false,
24+
"description": "Set true to update a symbolic link itself; content must be its new target path.",
25+
"type": "boolean"
26+
},
27+
"branch": {
28+
"description": "Branch to create/update the file in",
29+
"type": "string"
30+
},
31+
"content": {
32+
"description": "Content of the file, exactly as it should appear once written. Do not base64-encode it; this server does that before calling the REST API.",
33+
"type": "string"
34+
},
35+
"message": {
36+
"description": "Commit message",
37+
"type": "string"
38+
},
39+
"owner": {
40+
"description": "Repository owner (username or organization)",
41+
"type": "string",
42+
"x-mcp-header": "owner"
43+
},
44+
"path": {
45+
"description": "Path where to create/update the file",
46+
"type": "string"
47+
},
48+
"repo": {
49+
"description": "Repository name",
50+
"type": "string",
51+
"x-mcp-header": "repo"
52+
},
53+
"sha": {
54+
"description": "The blob SHA of the file being replaced. Required if the file already exists. Retrieve it with get_file_contents using the same owner, repo, and path, with ref set to this tool's branch value.",
55+
"type": "string"
56+
}
57+
},
58+
"required": [
59+
"owner",
60+
"repo",
61+
"path",
62+
"content",
63+
"message",
64+
"branch"
65+
],
66+
"type": "object"
67+
},
68+
"name": "create_or_update_file",
69+
"outputSchema": {
70+
"additionalProperties": false,
71+
"properties": {
72+
"commit": {
73+
"additionalProperties": false,
74+
"properties": {
75+
"author": {
76+
"additionalProperties": false,
77+
"properties": {
78+
"date": {
79+
"type": "string"
80+
},
81+
"email": {
82+
"type": "string"
83+
},
84+
"name": {
85+
"type": "string"
86+
}
87+
},
88+
"type": [
89+
"null",
90+
"object"
91+
]
92+
},
93+
"html_url": {
94+
"type": "string"
95+
},
96+
"message": {
97+
"type": "string"
98+
},
99+
"sha": {
100+
"type": "string"
101+
}
102+
},
103+
"required": [
104+
"sha"
105+
],
106+
"type": [
107+
"null",
108+
"object"
109+
]
110+
},
111+
"content": {
112+
"additionalProperties": false,
113+
"properties": {
114+
"html_url": {
115+
"type": "string"
116+
},
117+
"name": {
118+
"type": "string"
119+
},
120+
"path": {
121+
"type": "string"
122+
},
123+
"sha": {
124+
"type": "string"
125+
},
126+
"size": {
127+
"type": "integer"
128+
}
129+
},
130+
"required": [
131+
"name",
132+
"path",
133+
"sha",
134+
"html_url"
135+
],
136+
"type": [
137+
"null",
138+
"object"
139+
]
140+
}
141+
},
142+
"type": "object"
143+
}
144+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"annotations": {
3+
"idempotentHint": false,
4+
"readOnlyHint": false,
5+
"title": "Create repository"
6+
},
7+
"description": "Create a new GitHub repository in your account or specified organization",
8+
"icons": [
9+
{
10+
"mimeType": "image/png",
11+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAABTklEQVRIie2UPUvDUBSGn5PW2qnYwUXExWhNpY2CUKT+BB10E3R0dnbrppuKLgouHbr5X5qlKRIFB+cuguBHj4O05KYfNsVJ+m7n3Hue54ZcrhDKQqGQTX1YVwg7QIbx0gh8b7VTJMMrqS+5RtgD7oDX2GhhC6UcbhkCVLZVuX1sesex4YCdX6uAGgIrsicjlrTGgQ9KVPDnmQgmgongPwgkXNiOq8ADMAtkx4UGvtflJvus20ANeIlN/vW5/kkt8L3D2HD6P9dRgSI8dQcc9w1IR3acBE3vbFSp8ZMVnoFSqJ/unZDe3pAYXyDIJarn9opbDZrewaAh2y7Oy5S1r6h5QG2Xxbw3piDw6xe244oKyxFmC5ihc+tS1qaqngKJyAEBGmZvSGzHVYT790T7aPozsaFoFZGboFGvDJsbOYuOuxuuc7n1uaV8sRSH8Q1DUVLnYLty3gAAAABJRU5ErkJggg==",
12+
"theme": "light"
13+
},
14+
{
15+
"mimeType": "image/png",
16+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA+ElEQVRIie2WLU5DQRRGzwUEirQCQ9BsoSGtZQHgSFgIsg4JXQCGP8V2QCBIEATZkJDgOJi+MJnMo30TFHmfmzvzfeeKyZ2BROpQvVHfrddDmhkZ4BY4Ai6BD7prAowjIoq7i85nFcGNf6qa1tayM1vAvBZQUg74c/WAHtAD/gMgn6YCT8A2MKwOTaZpCfAF3AGvFdlLx7XqdUVw4186rgWeE8Nn4cU67QLNAS/ASG3qmwVPqdaqjWw9A86BK+CkzaTuAseFBse/AiLiQg1gLzs3Bwb8XIp94AxYL/Af2xordap6v/htHKhv6nTlgBUAh9l6Rx11yfgG8ne/zwh2OysAAAAASUVORK5CYII=",
17+
"theme": "dark"
18+
}
19+
],
20+
"inputSchema": {
21+
"properties": {
22+
"autoInit": {
23+
"description": "Initialize with README",
24+
"type": "boolean"
25+
},
26+
"description": {
27+
"description": "Repository description",
28+
"type": "string"
29+
},
30+
"name": {
31+
"description": "Repository name",
32+
"type": "string"
33+
},
34+
"organization": {
35+
"description": "Organization to create the repository in (omit to create in your personal account)",
36+
"type": "string"
37+
},
38+
"private": {
39+
"default": true,
40+
"description": "Whether the repository should be private. Defaults to true (private) when omitted.",
41+
"type": "boolean"
42+
}
43+
},
44+
"required": [
45+
"name"
46+
],
47+
"type": "object"
48+
},
49+
"name": "create_repository",
50+
"outputSchema": {
51+
"additionalProperties": false,
52+
"properties": {
53+
"id": {
54+
"type": "string"
55+
},
56+
"url": {
57+
"type": "string"
58+
}
59+
},
60+
"required": [
61+
"id",
62+
"url"
63+
],
64+
"type": "object"
65+
}
66+
}

0 commit comments

Comments
 (0)