MCPcopy
hub / github.com/github/github-mcp-server / testTools

Function testTools

pkg/http/handler_test.go:167–179  ·  view source on GitHub ↗

testTools returns a set of mock tools across different toolsets with mixed read-only/write capabilities

()

Source from the content-addressed store, hash-verified

165
166// testTools returns a set of mock tools across different toolsets with mixed read-only/write capabilities
167func testTools() []inventory.ServerTool {
168 return []inventory.ServerTool{
169 mockTool("get_file_contents", "repos", true),
170 mockTool("create_repository", "repos", false),
171 mockTool("list_issues", "issues", true),
172 mockTool("create_issue", "issues", false),
173 mockTool("list_pull_requests", "pull_requests", true),
174 mockTool("create_pull_request", "pull_requests", false),
175 // Feature-flagged tools for testing X-MCP-Features header
176 mockToolWithFeatureFlag("needs_holdback", "repos", true, "mcp_holdback_consolidated_projects", ""),
177 mockToolWithFeatureFlag("hidden_by_holdback", "repos", true, "", "mcp_holdback_consolidated_projects"),
178 }
179}
180
181// extractToolNames extracts tool names from an inventory
182func extractToolNames(ctx context.Context, inv *inventory.Inventory) []string {

Callers 2

TestHTTPHandlerRoutesFunction · 0.85
TestContentTypeHandlingFunction · 0.85

Calls 2

mockToolWithFeatureFlagFunction · 0.85
mockToolFunction · 0.70

Tested by

no test coverage detected