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
* Add instruction generation for enabled toolsets and corresponding tests
* Refactor instruction generation to always include base and context management instructions
* Refactor base instruction for clarity and adjust context management instruction formatting
* Simplify changes for now
* Remove unused toolset instructions and simplify test cases for clarity
* Add test cases for issues, notifications, and discussions toolsets in instruction generation
* Update base instruction and test expectations for clarity on tool selection and context management
* Add support for disabling instructions via environment variable
* Clarify PR review workflow instruction for consistency
* Apply suggestions from code review
Co-authored-by: Ksenia Bobrova <[email protected]>
* Refactor instruction generation and testing for clarity and consistency
---------
Co-authored-by: Ksenia Bobrova <[email protected]>
baseInstruction:=`The GitHub MCP Server provides tools to interact with GitHub platform.
32
+
33
+
Tool selection guidance:
34
+
1. Use 'list_*' tools for broad, simple retrieval and pagination of all items of a type (e.g., all issues, all PRs, all branches) with basic filtering.
35
+
2. Use 'search_*' tools for targeted queries with specific criteria, keywords, or complex filters (e.g., issues with certain text, PRs by author, code containing functions).
36
+
37
+
Context management:
38
+
1. Use pagination whenever possible with batches of 5-10 items.
39
+
2. Use minimal_output parameter set to true if the full information is not needed to accomplish a task.`
return"## Pull Requests\n\nPR review workflow: Always use 'create_pending_pull_request_review' → 'add_comment_to_pending_review' → 'submit_pending_pull_request_review' for complex reviews with line-specific comments."
52
+
case"issues":
53
+
return"## Issues\n\nCheck '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."
54
+
case"discussions":
55
+
return"## Discussions\n\nUse 'list_discussion_categories' to understand available categories before creating discussions. Filter by category for better organization."
0 commit comments