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

Function getToolAsync

apps/sim/tools/utils.server.ts:120–132  ·  view source on GitHub ↗
(
  toolId: string,
  context: GetToolAsyncContext = {}
)

Source from the content-addressed store, hash-verified

118
119// Get a tool by its ID asynchronously (supports server-side)
120export async function getToolAsync(
121 toolId: string,
122 context: GetToolAsyncContext = {}
123): Promise<ToolConfig | undefined> {
124 const builtInTool = tools[resolveToolId(toolId)]
125 if (builtInTool) return builtInTool
126
127 if (isCustomTool(toolId)) {
128 return fetchCustomToolFromDB(toolId, context)
129 }
130
131 return undefined
132}
133
134async function fetchCustomToolFromDB(
135 customToolId: string,

Callers 3

index.test.tsFile · 0.90
transformBlockToolMethod · 0.90
transformBlockToolFunction · 0.85

Calls 3

resolveToolIdFunction · 0.90
isCustomToolFunction · 0.90
fetchCustomToolFromDBFunction · 0.85

Tested by

no test coverage detected