Skip to content

Commit fc3f378

Browse files
committed
Update base instruction and test expectations for clarity on tool selection and context management
1 parent 1f500ab commit fc3f378

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/github/instructions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func GenerateInstructions(enabledToolsets []string) string {
1919
}
2020

2121
// Base instruction with context management
22-
baseInstruction := "The GitHub MCP Server provides GitHub API tools. GitHub API responses can overflow context windows. Strategy: 1) Always prefer 'search_*' tools over 'list_*' tools when possible - search tools return filtered results, 2) Process large datasets in batches rather than all at once, 3) For summarization tasks, fetch minimal data first, then drill down into specifics, 4) When analyzing multiple items (issues, PRs, etc), process in groups of 5-10 to manage context."
22+
baseInstruction := "The GitHub MCP Server provides GitHub API tools. Tool selection guidance: 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. 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). Context management: 1) GitHub API responses can overflow context windows, 2) Process large datasets in batches of 5-10 items, 3) For summarization tasks, fetch minimal data first, then drill down into specifics."
2323

2424
allInstructions := []string{baseInstruction}
2525
allInstructions = append(allInstructions, instructions...)

pkg/github/instructions_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ func TestGenerateInstructions(t *testing.T) {
1717
enabledToolsets: []string{},
1818
expectedContains: []string{
1919
"GitHub MCP Server provides GitHub API tools",
20-
"prefer 'search_*' tools over 'list_*' tools",
20+
"Use 'list_*' tools for broad, simple retrieval",
21+
"Use 'search_*' tools for targeted queries",
2122
"context windows",
2223
},
2324
},

0 commit comments

Comments
 (0)