Skip to content

Commit 6e7948c

Browse files
Add icons to remote server toolsets documentation
1 parent f4a8d47 commit 6e7948c

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

cmd/github-mcp-server/generate_docs.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,13 @@ func generateRemoteToolsetsDoc() string {
325325
// Build inventory - stateless
326326
r := github.NewInventory(t).Build()
327327

328-
// Generate table header
329-
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
330-
buf.WriteString("|----------------|--------------------------------------------------|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n")
328+
// Generate table header (with icon column)
329+
buf.WriteString("| | Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
330+
buf.WriteString("| --- | ---- | ----------- | ------- | ------------------------- | -------------- | ----------------------------------- |\n")
331331

332332
// Add "all" toolset first (special case)
333-
buf.WriteString("| 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")
333+
allIcon := octiconImg("apps")
334+
fmt.Fprintf(&buf, "| %s | 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)
334335

335336
// AvailableToolsets() returns toolsets that have tools, sorted by ID
336337
// Exclude context (handled separately) and dynamic (internal only)
@@ -352,12 +353,14 @@ func generateRemoteToolsetsDoc() string {
352353
installLink := fmt.Sprintf("[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)", idStr, installConfig)
353354
readonlyInstallLink := fmt.Sprintf("[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)", idStr, readonlyConfig)
354355

355-
fmt.Fprintf(&buf, "| %-14s | %-48s | %-53s | %-218s | %-110s | %-288s |\n",
356+
icon := octiconImg(ts.Icon)
357+
fmt.Fprintf(&buf, "| %s | %s | %s | %s | %s | [read-only](%s) | %s |\n",
358+
icon,
356359
formattedName,
357360
ts.Description,
358361
apiURL,
359362
installLink,
360-
fmt.Sprintf("[read-only](%s)", readonlyURL),
363+
readonlyURL,
361364
readonlyInstallLink,
362365
)
363366
}

0 commit comments

Comments
 (0)