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

Function stripToolPrefix

packages/core/sdk/src/migration-spec.ts:223–224  ·  view source on GitHub ↗
(sourceId: string, toolId: string)

Source from the content-addressed store, hash-verified

221const fullToolKey = (sourceId: string, toolName: string): string => `${sourceId}.${toolName}`;
222
223const stripToolPrefix = (sourceId: string, toolId: string): string =>
224 toolId.startsWith(`${sourceId}.`) ? toolId.slice(sourceId.length + 1) : toolId;
225
226const legacyMcpToolBinding = (data: unknown): LegacyMcpToolBinding | null => {
227 if (!isRecord(data) || !isRecord(data.binding)) return null;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected