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

Function fireToolExecution

apps/sim/lib/copilot/request/handlers/tool.ts:466–482  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464 const scopeLabel = scope === 'subagent' ? 'subagent ' : ''
465
466 const fireToolExecution = () => {
467 const pendingPromise = (async () => {
468 return executeToolAndReport(toolCallId, context, execContext, options)
469 })().catch((err) => {
470 logger.error(`Parallel ${scopeLabel}tool execution failed`, {
471 toolCallId,
472 toolName,
473 error: toError(err).message,
474 })
475 return {
476 status: MothershipStreamV1ToolOutcome.error,
477 message: 'Tool execution failed',
478 data: { error: 'Tool execution failed' },
479 }
480 })
481 registerPendingToolPromise(context, toolCallId, pendingPromise)
482 }
483
484 if (options.interactive === false) {
485 if (options.autoExecuteTools !== false) {

Callers 1

dispatchToolExecutionFunction · 0.85

Calls 4

executeToolAndReportFunction · 0.90
toErrorFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected