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
baseInstruction:=`The GitHub MCP Server provides tools to interact with GitHub platform.
32
19
@@ -41,103 +28,16 @@ Context management:
41
28
Tool usage guidance:
42
29
1. For 'search_*' tools: Use separate 'sort' and 'order' parameters if available for sorting results - do not include 'sort:' syntax in query strings. Query strings should contain only search criteria (e.g., 'org:google language:python'), not sorting instructions.`
PR review workflow: Always use 'pull_request_review_write' with method 'create' to create a pending review, then 'add_comment_to_pending_review' to add comments, and finally 'pull_request_review_write' with method 'submit_pending' to submit the review for complex reviews with line-specific comments.`
Before creating a pull request, search for pull request templates in the repository. Template files are called pull_request_template.md or they're located in '.github/PULL_REQUEST_TEMPLATE' directory. Use the template content to structure the PR description and then call create_pull_request tool.`
Check 'list_issue_types' first for organizations to use proper issue types. Use 'search_issues' before creating new issues to avoid duplicates. Always set 'state_reason' when closing issues.`
67
-
caseToolsetID("discussions"):
68
-
return`## Discussions
69
-
70
-
Use 'list_discussion_categories' to understand available categories before creating discussions. Filter by category for better organization.`
Return COMPLETE data or state what's missing (e.g. pages skipped).
102
-
103
-
list_project_items query rules:
104
-
Query string - For advanced filtering of project items using GitHub's project filtering syntax:
105
-
106
-
MUST reflect user intent; strongly prefer explicit content type if narrowed:
107
-
- "open issues" → state:open is:issue
108
-
- "merged PRs" → state:merged is:pr
109
-
- "items updated this week" → updated:>@today-7d (omit type only if mixed desired)
110
-
- "list all P1 priority items" → priority:p1 (omit state if user wants all, omit type if user specifies "items")
111
-
- "list all open P2 issues" → is:issue state:open priority:p2 (include state if user wants open or closed, include type if user specifies "issues" or "PRs")
112
-
- "all open issues I'm working on" → is:issue state:open assignee:@me
113
-
114
-
Query Construction Heuristics:
115
-
a. Extract type nouns: issues → is:issue | PRs, Pulls, or Pull Requests → is:pr | tasks/tickets → is:issue (ask if ambiguity)
116
-
b. Map temporal phrases: "this week" → updated:>@today-7d
117
-
c. Map negations: "excluding wontfix" → -label:wontfix
118
-
d. Map priority adjectives: "high/sev1/p1" → priority:high OR priority:p1 (choose based on field presence)
119
-
e. When filtering by label, always use wildcard matching to account for cross-repository differences or emojis: (e.g. "bug 🐛" → label:*bug*)
120
-
f. When filtering by milestone, always use wildcard matching to account for cross-repository differences: (e.g. "v1.0" → milestone:*v1.0*)
121
-
122
-
Syntax Essentials (items):
123
-
AND: space-separated. (label:bug priority:high).
124
-
OR: comma inside one qualifier (label:bug,critical).
125
-
NOT: leading '-' (-label:wontfix).
126
-
Hyphenate multi-word field names. (team-name:"Backend Team", story-points:>5).
0 commit comments