MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveToolId

Function resolveToolId

apps/sim/tools/utils.ts:64–77  ·  view source on GitHub ↗
(toolName: string)

Source from the content-addressed store, hash-verified

62 * @returns The actual tool ID in the registry, or the original name if not found
63 */
64export function resolveToolId(toolName: string): string {
65 if (tools[toolName]) {
66 return toolName
67 }
68
69 const latestTools = getLatestVersionTools(tools)
70 for (const toolId of Object.keys(latestTools)) {
71 if (stripVersionSuffix(toolId) === toolName) {
72 return toolId
73 }
74 }
75
76 return toolName
77}
78
79export interface RequestParams {
80 url: string

Callers 2

getToolAsyncFunction · 0.90
getToolFunction · 0.70

Calls 2

stripVersionSuffixFunction · 0.90
getLatestVersionToolsFunction · 0.85

Tested by

no test coverage detected