From fdc1cb42f778d2573db91bb214b775f6f3d05b54 Mon Sep 17 00:00:00 2001 From: tommaso-moro Date: Mon, 6 Oct 2025 16:07:13 +0100 Subject: [PATCH 1/2] make instructions for flexible around search tools --- pkg/github/instructions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/github/instructions.go b/pkg/github/instructions.go index 7eefe53f0..4ebcd1d9f 100644 --- a/pkg/github/instructions.go +++ b/pkg/github/instructions.go @@ -28,11 +28,11 @@ func GenerateInstructions(enabledToolsets []string) string { } // Base instruction with context management - baseInstruction := `The GitHub MCP Server provides tools to interact with GitHub platform. + baseInstruction := `The GitHub MCP Server provides tools to interact with GitHub. Tool selection guidance: 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. - 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). + 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). Context management: 1. Use pagination whenever possible with batches of 5-10 items. From a5fd8076050af6ab8b5e5f9d6644e209b3187c98 Mon Sep 17 00:00:00 2001 From: tommaso-moro Date: Mon, 6 Oct 2025 16:26:28 +0100 Subject: [PATCH 2/2] swap sections --- pkg/github/instructions.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/github/instructions.go b/pkg/github/instructions.go index 4ebcd1d9f..fcf11d816 100644 --- a/pkg/github/instructions.go +++ b/pkg/github/instructions.go @@ -30,13 +30,13 @@ func GenerateInstructions(enabledToolsets []string) string { // Base instruction with context management baseInstruction := `The GitHub MCP Server provides tools to interact with GitHub. -Tool selection guidance: - 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. - 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). - Context management: 1. Use pagination whenever possible with batches of 5-10 items. - 2. Use minimal_output parameter set to true if the full information is not needed to accomplish a task.` + 2. Use minimal_output parameter set to true if the full information is not needed to accomplish a task. + +Tool selection guidance: + 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. + 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).` allInstructions := []string{baseInstruction} allInstructions = append(allInstructions, instructions...)