MCPcopy Create free account
hub / github.com/github/copilot-sdk / validateToolName

Function validateToolName

go/toolset.go:87–99  ·  view source on GitHub ↗
(kind, name string)

Source from the content-addressed store, hash-verified

85}
86
87func validateToolName(kind, name string) {
88 if name == "" {
89 panic(fmt.Sprintf("invalid %s tool name: must not be empty", kind))
90 }
91 if name == "*" {
92 return
93 }
94 if !toolNameRegex.MatchString(name) {
95 panic(fmt.Sprintf(
96 "invalid %s tool name %q: tool names must match /^[a-zA-Z0-9_-]+$/ or be the wildcard %q",
97 kind, name, "*"))
98 }
99}
100
101// BuiltInToolsIsolated lists built-in tools that operate only within the
102// bounds of a single session — no host filesystem access outside the session,

Callers 3

AddBuiltInMethod · 0.85
AddCustomMethod · 0.85
AddMCPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…