MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / sanitizeMCPModelName

Function sanitizeMCPModelName

tools/mcp_schema.go:232–241  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

230}
231
232func sanitizeMCPModelName(name string) string {
233 safe := regexp.MustCompile(`[^a-zA-Z0-9]`).ReplaceAllString(name, "_")
234 if safe == "" {
235 return "McpDynamicInput"
236 }
237 if safe[0] >= '0' && safe[0] <= '9' {
238 return "_" + safe
239 }
240 return safe
241}
242
243func mcpFieldTitle(name string) string {
244 if name == "" {

Callers 2

BuildMCPInputSchemaFunction · 0.85
convertMCPPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected