Title: generateInstructions uses AvailableToolsets instead of EnabledToolsetIDs · Issue #1897 · github/github-mcp-server · GitHub
Open Graph Title: generateInstructions uses AvailableToolsets instead of EnabledToolsetIDs · Issue #1897 · github/github-mcp-server
X Title: generateInstructions uses AvailableToolsets instead of EnabledToolsetIDs · Issue #1897 · github/github-mcp-server
Description: Bug Description In pkg/inventory/instructions.go, the generateInstructions() function iterates over inv.AvailableToolsets() which returns all toolsets that have tools defined, rather than only the enabled toolsets based on the WithToolse...
Open Graph Description: Bug Description In pkg/inventory/instructions.go, the generateInstructions() function iterates over inv.AvailableToolsets() which returns all toolsets that have tools defined, rather than only the ...
X Description: Bug Description In pkg/inventory/instructions.go, the generateInstructions() function iterates over inv.AvailableToolsets() which returns all toolsets that have tools defined, rather than only the ...
Opengraph URL: https://github.com/github/github-mcp-server/issues/1897
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"generateInstructions uses AvailableToolsets instead of EnabledToolsetIDs","articleBody":"## Bug Description\n\nIn `pkg/inventory/instructions.go`, the `generateInstructions()` function iterates over `inv.AvailableToolsets()` which returns **all** toolsets that have tools defined, rather than only the **enabled** toolsets based on the `WithToolsets()` configuration.\n\n```go\n// Collect instructions from each enabled toolset\nfor _, toolset := range inv.AvailableToolsets() { // \u003c- BUG: should use enabled toolsets\n if toolset.InstructionsFunc != nil {\n if toolsetInstructions := toolset.InstructionsFunc(inv); toolsetInstructions != \"\" {\n instructions = append(instructions, toolsetInstructions)\n }\n }\n}\n```\n\n## Expected Behavior\n\nWhen building an inventory with `WithToolsets([]string{\"repos\"})`, the generated instructions should only include instructions for the `repos` toolset.\n\n## Actual Behavior\n\nInstructions for **all** toolsets (context, issues, pull_requests, discussions, projects, etc.) are included regardless of which toolsets are enabled.\n\n## Evidence\n\nFrom [mcp-server-diff](https://github.com/marketplace/actions/mcp-server-diff) action comparing v0.29.0 (base) vs v0.30.1 (branch) with `repos` toolset only:\n\n- Base (v0.29.0): **1226 chars** of instructions\n- Branch (v0.30.1): **5886 chars** of instructions\n\nThe v0.30.1 instructions incorrectly include:\n- \"Always call 'get_me' first...\" (context toolset - not enabled)\n- Discussions instructions (not enabled)\n- Issues instructions (not enabled)\n- Projects instructions (not enabled)\n\n## How to Reproduce\n\n1. Update the [mcp-server-diff](https://github.com/marketplace/actions/mcp-server-diff) action to v2.2.0 to see server instruction diffs in CI\n2. Build an inventory with a single toolset: `WithToolsets([]string{\"repos\"}).WithServerInstructions()`\n3. Check `inv.Instructions()` - it will contain instructions for all toolsets, not just repos\n\n## Suggested Fix\n\nUse `EnabledToolsetIDs()` and look up toolset metadata, or add a new `EnabledToolsets()` method that returns `[]ToolsetMetadata` for only enabled toolsets:\n\n```go\nfor _, toolsetID := range inv.EnabledToolsetIDs() {\n toolset := inv.GetToolsetMetadata(toolsetID) // or similar\n if toolset.InstructionsFunc != nil {\n // ...\n }\n}\n```\n\n## Version\n\nv0.30.1","author":{"url":"https://github.com/SamMorrowDrums","@type":"Person","name":"SamMorrowDrums"},"datePublished":"2026-01-26T16:52:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1897/github-mcp-server/issues/1897"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7e7bf06a-09f2-f694-c448-fc72c1461b9f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8020:1C8839:16C21C0:204E892:6A61D5D3 |
| html-safe-nonce | 63a20d539b73214d3aa676cfb75b949093616b7c4433ac2708c54c7b46f0a5be |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDIwOjFDODgzOToxNkMyMUMwOjIwNEU4OTI6NkE2MUQ1RDMiLCJ2aXNpdG9yX2lkIjoiNjc2MzIwMzk3ODIzNzk1NzU4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7d2cc19506ae27a03dc199284b188ab0ed2b57d53828a5c66e6d9e8645501dfb |
| hovercard-subject-tag | issue:3856774925 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/1897/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2cef2d014992970c7239b50e632e82802fbc548e74da2b51615736a38e0a3cd4/github/github-mcp-server/issues/1897 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2cef2d014992970c7239b50e632e82802fbc548e74da2b51615736a38e0a3cd4/github/github-mcp-server/issues/1897 |
| og:image:alt | Bug Description In pkg/inventory/instructions.go, the generateInstructions() function iterates over inv.AvailableToolsets() which returns all toolsets that have tools defined, rather than only the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SamMorrowDrums |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width