You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ai/mcp/server/github-workflow/openapi.yaml
+76-18Lines changed: 76 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,10 @@ openapi: 3.0.3
2
2
info:
3
3
title: Neo.mjs GitHub Workflow MCP Server API
4
4
description: |
5
-
This API provides structured access to the GitHub CLI (`gh`) to streamline and automate
6
-
contribution workflows for the Neo.mjs project. It enables AI agents to interact with
7
-
pull requests and issues programmatically.
5
+
This API provides structured access to the Neo.mjs GitHub repository, enabling the automation of contribution workflows.
6
+
It uses a hybrid approach, leveraging both the GitHub CLI (`gh`) for simple, direct commands (e.g., checking out a PR)
7
+
and the GitHub GraphQL API for complex data fetching and mutations (e.g., listing PRs, creating comments, syncing issues).
8
+
This allows AI agents to programmatically interact with pull requests and issues in a safe and efficient manner.
8
9
version: 1.0.0
9
10
contact:
10
11
name: Neo.mjs Project
@@ -48,8 +49,10 @@ paths:
48
49
x-annotations:
49
50
readOnlyHint: true
50
51
description: |
51
-
Verifies that the GitHub CLI (`gh`) is installed, authenticated, and
52
-
meets the minimum version requirement. Use this to diagnose setup issues.
52
+
Verifies that the GitHub CLI (`gh`) is installed, authenticated, and meets the minimum version requirement.
53
+
54
+
**When to Use:**
55
+
This should be the first tool you run if you suspect any issues with the GitHub Workflow MCP server. It provides a quick diagnostic check on the server's primary dependency.
53
56
tags: [Health]
54
57
responses:
55
58
'200':
@@ -71,7 +74,11 @@ paths:
71
74
operationId: list_labels
72
75
x-annotations:
73
76
readOnlyHint: true
74
-
description: Retrieves a list of all available labels in the repository.
77
+
description: |
78
+
Retrieves a list of all available labels in the repository.
79
+
80
+
**When to Use:**
81
+
This is a crucial discovery tool. Call it before using `create_issue` or `add_labels` to ensure you are using valid, existing label names.
75
82
tags: [Labels]
76
83
responses:
77
84
'200':
@@ -94,7 +101,11 @@ paths:
94
101
x-pass-as-object: true
95
102
x-annotations:
96
103
readOnlyHint: true
97
-
description: Retrieves a list of open pull requests from the GitHub repository.
104
+
description: |
105
+
Retrieves a list of pull requests from the GitHub repository.
106
+
107
+
**When to Use:**
108
+
Use this tool to get a high-level overview of pending work or to find a specific pull request number for use in other tools like `get_pull_request_diff` or `checkout_pull_request`.
98
109
tags: [Pull Requests]
99
110
parameters:
100
111
- name: limit
@@ -134,7 +145,12 @@ paths:
134
145
operationId: checkout_pull_request
135
146
x-annotations:
136
147
readOnlyHint: false
137
-
description: Checks out the branch for a given pull request locally using `gh pr checkout`.
148
+
description: |
149
+
Checks out the branch for a given pull request locally using `gh pr checkout`.
150
+
This modifies the local filesystem to reflect the state of the pull request branch.
151
+
152
+
**When to Use:**
153
+
Use this tool when you need to locally inspect the code changes of a pull request, run tests, or perform a more detailed review.
138
154
tags: [Pull Requests]
139
155
parameters:
140
156
- name: pr_number
@@ -170,7 +186,12 @@ paths:
170
186
operationId: get_pull_request_diff
171
187
x-annotations:
172
188
readOnlyHint: true
173
-
description: Retrieves the diff for a specific pull request using `gh pr diff`.
189
+
description: |
190
+
Retrieves the diff for a specific pull request using `gh pr diff`.
191
+
This provides a quick, read-only overview of the changes without checking out the branch.
192
+
193
+
**When to Use:**
194
+
Use this tool for a quick review of the changes in a pull request. For a more in-depth review, use `checkout_pull_request`.
174
195
tags: [Pull Requests]
175
196
parameters:
176
197
- name: pr_number
@@ -206,7 +227,11 @@ paths:
206
227
operationId: create_comment
207
228
x-annotations:
208
229
readOnlyHint: false
209
-
description: Adds a comment to a specific pull request.
230
+
description: |
231
+
Adds a comment to a specific pull request.
232
+
233
+
**When to Use:**
234
+
Use this tool to add review comments, ask questions, or provide feedback on a pull request.
210
235
tags: [Pull Requests]
211
236
parameters:
212
237
- name: pr_number
@@ -255,7 +280,11 @@ paths:
255
280
operationId: get_conversation
256
281
x-annotations:
257
282
readOnlyHint: true
258
-
description: Retrieves the full conversation for a pull request, including the title, body, and all comments.
283
+
description: |
284
+
Retrieves the full conversation for a pull request, including the title, body, and all comments.
285
+
286
+
**When to Use:**
287
+
Use this tool to get the complete context of a pull request, including the initial proposal and the full discussion history, which is essential for a comprehensive review.
259
288
tags: [Pull Requests]
260
289
parameters:
261
290
- name: pr_number
@@ -279,7 +308,11 @@ paths:
279
308
operationId: add_labels
280
309
x-annotations:
281
310
readOnlyHint: false
282
-
description: Adds one or more labels to a specific issue or pull request.
311
+
description: |
312
+
Adds one or more labels to a specific issue or pull request.
313
+
314
+
**Important:** You must use the exact names of labels that already exist in the repository.
315
+
Use the `list_labels` tool to get a list of available labels if you are unsure.
283
316
tags: [Issues]
284
317
parameters:
285
318
- name: issue_number
@@ -327,7 +360,11 @@ paths:
327
360
x-annotations:
328
361
readOnlyHint: false
329
362
destructiveHint: true
330
-
description: Removes one or more labels from a specific issue or pull request.
363
+
description: |
364
+
Removes one or more labels from a specific issue or pull request.
365
+
366
+
**Important:** You must use the exact names of labels that already exist in the repository.
367
+
Use the `list_labels` tool to see which labels are currently on an issue or to verify their names.
331
368
tags: [Issues]
332
369
parameters:
333
370
- name: issue_number
@@ -376,7 +413,13 @@ paths:
376
413
operationId: get_local_issue_by_id
377
414
x-annotations:
378
415
readOnlyHint: true
379
-
description: Retrieves the full markdown content of a local issue file by its number, searching both active and archived issues.
416
+
description: |
417
+
Retrieves the full markdown content of a local issue file by its number, searching both active and archived issues.
418
+
419
+
**When to Use:**
420
+
Use this tool for a fast, offline-capable way to read the content of an issue that is already present on the local disk. This tool reads directly from the file system and does **not** access the GitHub API.
421
+
422
+
**Important:** The content returned reflects the state of the issue at the time of the last `sync_all` operation and may not be the most up-to-date version if remote changes have occurred since.
380
423
tags: [Issues]
381
424
parameters:
382
425
- name: issue_number
@@ -412,7 +455,16 @@ paths:
412
455
x-pass-as-object: true
413
456
x-annotations:
414
457
readOnlyHint: false
415
-
description: Creates a new GitHub issue with the given title, body, and labels.
458
+
description: |
459
+
Creates a new issue on GitHub. This is the authoritative first step for creating a new ticket.
460
+
461
+
**Workflow:**
462
+
1. Call this tool (`create_issue`) to create the issue on GitHub.
463
+
2. Call the `sync_all` tool to create the corresponding local Markdown file.
464
+
465
+
**Important:**
466
+
The `labels` array must only contain labels that already exist in the repository.
467
+
If you are unsure about the available labels, use the `list_labels` tool first.
416
468
tags: [Issues]
417
469
requestBody:
418
470
required: true
@@ -457,9 +509,15 @@ paths:
457
509
x-annotations:
458
510
readOnlyHint: false
459
511
description: |
460
-
Triggers the bi-directional synchronization process for GitHub issues.
461
-
Pushes local Markdown file changes to GitHub and pulls the latest issue
462
-
and comment data from GitHub to the local files.
512
+
Triggers the full, bi-directional synchronization of GitHub issues and releases with the local filesystem.
513
+
This is a comprehensive operation that should be run after making remote changes (e.g., using `create_issue`)
514
+
or before looking for local changes to push.
515
+
516
+
**Key Functions:**
517
+
- **Pulls remote changes:** Fetches the latest issue and release data from GitHub.
518
+
- **Creates local files:** If a new issue was created on GitHub (e.g., via the `create_issue` tool), this process will create the corresponding local `.md` file.
519
+
- **Pushes local changes:** Scans for modifications in local issue files (in the active `ISSUE` directory only) and pushes them to GitHub.
520
+
- **Efficient:** Uses a metadata cache and content hashing to ensure that only actual changes are pushed or pulled, making it fast for no-op runs.
0 commit comments