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

Function hasNonFormParams

pkg/github/ui_capability.go:50–60  ·  view source on GitHub ↗

hasNonFormParams reports whether the call carries any parameter the tool's MCP App form cannot represent (anything outside formParams). Such calls must bypass the form and execute directly so the supplied values aren't silently dropped. formParams is the set of parameters the form collects and re-se

(args map[string]any, formParams map[string]struct{})

Source from the content-addressed store, hash-verified

48// dropped. formParams is the set of parameters the form collects and re-sends
49// on submit.
50func hasNonFormParams(args map[string]any, formParams map[string]struct{}) bool {
51 for key, value := range args {
52 if value == nil {
53 continue
54 }
55 if _, ok := formParams[key]; !ok {
56 return true
57 }
58 }
59 return false
60}
61
62// shouldDeferToForm is the single source of truth for the show/defer decision
63// shared by the form-backed write tools (create_pull_request,

Callers 3

shouldDeferToFormFunction · 0.85

Calls

no outgoing calls