Skip to content

Commit 8058d30

Browse files
Update automation to use toolset IDs instead of display names
The generate-docs command now outputs toolset IDs (e.g., `actions`, `code_security`) wrapped in backticks instead of display names (e.g., "Actions", "Code Security"). This ensures the manual changes from PR #1756 persist when the docs are regenerated, fixing the issue where users need to configure the actual toolset ID, not the display name. Changes: - Modified generateRemoteToolsetsDoc() to use `idStr` instead of `formattedName()` - Modified generateRemoteOnlyToolsetsDoc() to use `idStr` instead of `formattedName()` - Both functions now wrap the toolset ID in backticks for clarity Co-authored-by: SamMorrowDrums <[email protected]>
1 parent 44d9e13 commit 8058d30

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cmd/github-mcp-server/generate_docs.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,13 @@ func generateRemoteToolsetsDoc() string {
349349

350350
// Add "all" toolset first (special case)
351351
allIcon := octiconImg("apps", "../")
352-
fmt.Fprintf(&buf, "| %s<br>all | All available GitHub MCP tools | https://api.githubcopilot.com/mcp/ | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2F%%22%%7D) | [read-only](https://api.githubcopilot.com/mcp/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2Freadonly%%22%%7D) |\n", allIcon)
352+
fmt.Fprintf(&buf, "| %s<br>`all` | All available GitHub MCP tools | https://api.githubcopilot.com/mcp/ | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2F%%22%%7D) | [read-only](https://api.githubcopilot.com/mcp/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2Freadonly%%22%%7D) |\n", allIcon)
353353

354354
// AvailableToolsets() returns toolsets that have tools, sorted by ID
355355
// Exclude context (handled separately) and dynamic (internal only)
356356
for _, ts := range r.AvailableToolsets("context", "dynamic") {
357357
idStr := string(ts.ID)
358358

359-
formattedName := formatToolsetName(idStr)
360359
apiURL := fmt.Sprintf("https://api.githubcopilot.com/mcp/x/%s", idStr)
361360
readonlyURL := fmt.Sprintf("https://api.githubcopilot.com/mcp/x/%s/readonly", idStr)
362361

@@ -372,9 +371,9 @@ func generateRemoteToolsetsDoc() string {
372371
readonlyInstallLink := fmt.Sprintf("[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)", idStr, readonlyConfig)
373372

374373
icon := octiconImg(ts.Icon, "../")
375-
fmt.Fprintf(&buf, "| %s<br>%s | %s | %s | %s | [read-only](%s) | %s |\n",
374+
fmt.Fprintf(&buf, "| %s<br>`%s` | %s | %s | %s | [read-only](%s) | %s |\n",
376375
icon,
377-
formattedName,
376+
idStr,
378377
ts.Description,
379378
apiURL,
380379
installLink,
@@ -397,7 +396,6 @@ func generateRemoteOnlyToolsetsDoc() string {
397396
for _, ts := range github.RemoteOnlyToolsets() {
398397
idStr := string(ts.ID)
399398

400-
formattedName := formatToolsetName(idStr)
401399
apiURL := fmt.Sprintf("https://api.githubcopilot.com/mcp/x/%s", idStr)
402400
readonlyURL := fmt.Sprintf("https://api.githubcopilot.com/mcp/x/%s/readonly", idStr)
403401

@@ -413,9 +411,9 @@ func generateRemoteOnlyToolsetsDoc() string {
413411
readonlyInstallLink := fmt.Sprintf("[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)", idStr, readonlyConfig)
414412

415413
icon := octiconImg(ts.Icon, "../")
416-
fmt.Fprintf(&buf, "| %s<br>%s | %s | %s | %s | [read-only](%s) | %s |\n",
414+
fmt.Fprintf(&buf, "| %s<br>`%s` | %s | %s | %s | [read-only](%s) | %s |\n",
417415
icon,
418-
formattedName,
416+
idStr,
419417
ts.Description,
420418
apiURL,
421419
installLink,

0 commit comments

Comments
 (0)