Skip to content

Commit 7d40fdc

Browse files
committed
Enforce "Propose-First" workflow and Labeling in create_issue tool description #7884
1 parent 4009089 commit 7d40fdc

1 file changed

Lines changed: 24 additions & 12 deletions

File tree

ai/mcp/server/github-workflow/openapi.yaml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -747,18 +747,30 @@ paths:
747747
description: |
748748
Creates a new issue on GitHub. This is the authoritative first step for creating a new ticket.
749749
750-
**Workflow:**
751-
1. **Formulate:** Determine the appropriate `title`, `body`, and `labels` for the issue.
752-
2. **Propose to User:** Before calling the tool, you MUST output the proposed `title`, `labels`, and `body` in a clear format for the user to review.
753-
3. **Call Tool:** Immediately after proposing, call the `create_issue` tool. The user can review the content and approve/deny the tool call itself.
754-
755-
After the issue is created on GitHub, you can get a local copy of it by running the `sync_all` tool at an appropriate time, such as when you are ready to push other local changes or when you want to refresh your local environment.
756-
757-
**Labeling Rules (VERY IMPORTANT):**
758-
- You MUST include the `ai` label on all tickets you create.
759-
- You SHOULD also include one of the primary labels (`epic`, `enhancement`, `bug`) whenever applicable. Most tickets will fit into one of these categories.
760-
- For other cases, like `documentation`, use the most appropriate label.
761-
- Before using any labels, verify they exist by using the `list_labels` tool.
750+
## CRITICAL PROTOCOL: READ BEFORE USING
751+
You generally FAIL to show the proposal to the user before calling this tool. Do not let that happen.
752+
753+
**MANDATORY WORKFLOW (Do Not Skip):**
754+
755+
1. **Check Labels:** Run `list_labels` to verify available labels.
756+
2. **Draft Content:** Formulate the `title`, `body`, and `labels`.
757+
3. **VISUAL PROPOSAL (REQUIRED):** You **MUST** display the proposed ticket content to the user **IN THE CHAT** before calling this tool. Use this format:
758+
```text
759+
Title: [Proposed Title]
760+
Labels: [label1, label2]
761+
Body:
762+
[Proposed Body]
763+
```
764+
4. **Call Tool:** Only *after* displaying the proposal, call `create_issue`.
765+
766+
**STRICT LABELING RULES:**
767+
- **MANDATORY:** The `ai` label is REQUIRED on ALL tickets you create.
768+
- **PRIMARY:** Include one primary label: `epic`, `enhancement`, or `bug`.
769+
- **SECONDARY:** Add other relevant labels (e.g., `documentation`) if they exist.
770+
771+
**Post-Creation:**
772+
The tool returns the new issue number. You can use this number immediately for other tools (e.g., `create_comment`, `assign_issue`).
773+
To update the issue body later, use `run_shell_command` with `gh issue edit {number} --body "..."`.
762774
tags: [Issues]
763775
requestBody:
764776
required: true

0 commit comments

Comments
 (0)