Skip to content

Commit 8a69a5c

Browse files
authored
Add flexibility around server instructions for search-related tools (#1181)
* make instructions for flexible around search tools * swap sections
1 parent bf0d62e commit 8a69a5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/github/instructions.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ func GenerateInstructions(enabledToolsets []string) string {
2828
}
2929

3030
// Base instruction with context management
31-
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).
31+
baseInstruction := `The GitHub MCP Server provides tools to interact with GitHub.
3632
3733
Context management:
3834
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.`
35+
2. Use minimal_output parameter set to true if the full information is not needed to accomplish a task.
36+
37+
Tool selection guidance:
38+
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.
39+
2. Use tools containing 'search' in their name for targeted queries with specific criteria, keywords, or complex filters (e.g., issues with certain text, PRs by author, code containing functions).`
4040

4141
allInstructions := []string{baseInstruction}
4242
allInstructions = append(allInstructions, instructions...)

0 commit comments

Comments
 (0)