MCPcopy Create free account
hub / github.com/anomalyco/opencode / toolCall

Function toolCall

packages/llm/src/protocols/utils/tool-stream.ts:66–78  ·  view source on GitHub ↗
(route: string, tool: PendingTool, inputOverride?: string)

Source from the content-addressed store, hash-verified

64 })
65
66const toolCall = (route: string, tool: PendingTool, inputOverride?: string) =>
67 parseToolInput(route, tool.name, inputOverride ?? tool.input).pipe(
68 Effect.map(
69 (input): ToolCall =>
70 LLMEvent.toolCall({
71 id: tool.id,
72 name: tool.name,
73 input,
74 providerExecuted: tool.providerExecuted ? true : undefined,
75 providerMetadata: tool.providerMetadata,
76 }),
77 ),
78 )
79
80/** Store the updated tool and produce the optional public delta event. */
81const appendTool = <K extends StreamKey>(

Callers 3

finishFunction · 0.70
finishWithInputFunction · 0.70
finishAllFunction · 0.70

Calls 1

parseToolInputFunction · 0.90

Tested by

no test coverage detected