You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(generate_docs): use strings.Builder and AllTools() iteration
- Replace slice joining with strings.Builder for all doc generation
- Iterate AllTools() directly instead of ToolsetIDs()/ToolsForToolset()
- Removes need for special 'dynamic' toolset handling (no tools = no output)
- Context toolset still explicitly handled for custom description
- Consistent pattern across generateToolsetsDoc, generateToolsDoc,
generateRemoteToolsetsDoc, and generateDeprecatedAliasesTable
// Add the context toolset row (handled separately in README)
117
-
lines=append(lines, "| `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |")
118
-
119
-
// Get toolset IDs and descriptions
120
-
toolsetIDs:=tsg.ToolsetIDs()
121
-
descriptions:=tsg.ToolsetDescriptions()
122
-
123
-
// Filter out context and dynamic toolsets (handled separately)
// Add the context toolset row with custom description (strongly recommended)
117
+
buf.WriteString("| `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |\n")
118
+
119
+
// AllTools() is sorted by toolset ID then tool name.
120
+
// We iterate once, collecting unique toolsets (skipping context which has custom description above).
121
+
tools:=tsg.AllTools()
122
+
varlastToolsetID toolsets.ToolsetID
123
+
for_, tool:=rangetools {
124
+
iftool.Toolset.ID!=lastToolsetID {
125
+
lastToolsetID=tool.Toolset.ID
126
+
// Skip context (handled above with custom description)
Copy file name to clipboardExpand all lines: docs/remote-server.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,6 @@ Below is a table of available toolsets for the remote GitHub MCP Server. Each to
37
37
| Security Advisories | Security advisories related tools |https://api.githubcopilot.com/mcp/x/security_advisories|[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-security_advisories&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fsecurity_advisories%22%7D)|[read-only](https://api.githubcopilot.com/mcp/x/security_advisories/readonly)|[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-security_advisories&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fsecurity_advisories%2Freadonly%22%7D)|
38
38
| Stargazers | GitHub Stargazers related tools |https://api.githubcopilot.com/mcp/x/stargazers|[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-stargazers&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fstargazers%22%7D)|[read-only](https://api.githubcopilot.com/mcp/x/stargazers/readonly)|[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-stargazers&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fstargazers%2Freadonly%22%7D)|
39
39
| Users | GitHub User related tools |https://api.githubcopilot.com/mcp/x/users|[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-users&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fusers%22%7D)|[read-only](https://api.githubcopilot.com/mcp/x/users/readonly)|[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-users&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fusers%2Freadonly%22%7D)|
0 commit comments