MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / formatToolPathSegment

Function formatToolPathSegment

packages/hosts/mcp/src/tool-call-code.ts:107–108  ·  view source on GitHub ↗
(segment: string)

Source from the content-addressed store, hash-verified

105const TOOL_PATH_SEGMENT = /^[A-Za-z_$][\w$-]*$/;
106
107const formatToolPathSegment = (segment: string): string =>
108 TOOL_PATH_IDENTIFIER.test(segment) ? `.${segment}` : `[${JSON.stringify(segment)}]`;
109
110/**
111 * Build the codemode call for a RESOLVED address — the full

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected