MCPcopy Index your code
hub / github.com/github/github-mcp-server / isCSVOutputTool

Function isCSVOutputTool

pkg/github/csv_output.go:64–69  ·  view source on GitHub ↗

isCSVOutputTool reports whether the given tool should have its handler wrapped to honor the csv_output feature flag. Wrapping happens at slice construction time, before the per-request feature-flag filter chooses which variant of a flag-gated tool to register, so flag-gated list_* tools are included

(tool inventory.ServerTool)

Source from the content-addressed store, hash-verified

62// variant of a flag-gated tool to register, so flag-gated list_* tools are
63// included on equal footing — only the live variant ever runs at request time.
64func isCSVOutputTool(tool inventory.ServerTool) bool {
65 if !tool.Toolset.Default {
66 return false
67 }
68 return strings.HasPrefix(tool.Tool.Name, "list_")
69}
70
71func wrapHandlerWithCSVOutput(next inventory.HandlerFunc) inventory.HandlerFunc {
72 return func(deps any) mcp.ToolHandler {

Callers 1

withCSVOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected