Skip to content

Commit c614cfa

Browse files
olaservoalmaleksia
authored andcommitted
Refactor base instruction for clarity and adjust context management instruction formatting
1 parent c304637 commit c614cfa

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/github/instructions.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ func GenerateInstructions(enabledToolsets []string) string {
3535
instructions = append(instructions, "For repository operations: Check workflow status before major changes using 'list_workflow_runs'.")
3636
}
3737

38-
// Always add base instructions - they provide universal value
39-
baseInstruction := "GitHub MCP Server provides GitHub API tools. Common parameters: 'owner' (repo owner), 'repo' (repo name), 'page'/'perPage' (pagination)."
38+
baseInstruction := "The GitHub MCP Server provides GitHub API tools."
4039

4140
// Add context management instruction for all configurations
42-
contextInstruction := "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."
41+
contextInstruction := " 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."
4342

4443
allInstructions := []string{baseInstruction, contextInstruction}
4544
allInstructions = append(allInstructions, instructions...)

0 commit comments

Comments
 (0)