Documentation
¶
Overview ¶
Package toolname provides shared tool name conversion between original namespaced format (serverID__toolName) and JavaScript-friendly camelCase format (serverIdToolName).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNamespaced ¶
IsNamespaced checks if a tool name is in namespaced format (contains "__").
func ParseNamespacedName ¶
ParseNamespacedName parses a namespaced tool name (serverID__toolName) into its parts. Returns serverID, toolName, and true if the name contains "__". Returns "", name, false if the name is not namespaced.
Types ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper maintains bidirectional mapping between original and JS method names.
func NewMapperWithCollisionCheck ¶
NewMapperWithCollisionCheck creates a mapper and returns an error if any tool names would collide after JS name conversion.
func (*Mapper) Resolve ¶
Resolve attempts to resolve a tool name to its original format. It accepts both JS names (camelCase) and original names (serverID__toolName). Returns the original name and true if found, or the input and false if not found.
func (*Mapper) ToOriginal ¶
ToOriginal converts a JS method name back to its original tool name. Returns the input unchanged if not found (allows pass-through for original names).