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

Function buildToolPath

apps/cli/src/tooling.ts:107–116  ·  view source on GitHub ↗
(parts: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

105};
106
107export const buildToolPath = (parts: ReadonlyArray<string>): string => {
108 const segments = toToolPathSegments(parts);
109 if (segments.length === 0) {
110 throw new Error("Tool path must include at least one segment");
111 }
112 if (segments.some((segment) => !TOOL_PATH_TOKEN.test(segment))) {
113 throw new Error("Tool path segments must contain only letters, numbers, '.', '_' or '-'");
114 }
115 return segments.join(".");
116};
117
118const buildToolAccessExpression = (toolPath: string): string => {
119 const segments = toToolPathSegments([toolPath]);

Callers 3

tools-cli.test.tsFile · 0.90
inspectToolPathFunction · 0.85
resolveToolInvocationFunction · 0.85

Calls 1

toToolPathSegmentsFunction · 0.85

Tested by

no test coverage detected