MCPcopy
hub / github.com/CopilotKit/CopilotKit / captureToolCall

Function captureToolCall

packages/bot-telegram/src/event-renderer.ts:126–138  ·  view source on GitHub ↗
(
    toolCallId: string,
    toolCallName: string,
    toolCallArgs: Record<string, unknown>,
  )

Source from the content-addressed store, hash-verified

124 };
125
126 const captureToolCall = (
127 toolCallId: string,
128 toolCallName: string,
129 toolCallArgs: Record<string, unknown>,
130 ) => {
131 const existing = capturedToolCalls.find((c) => c.toolCallId === toolCallId);
132 if (existing) {
133 existing.toolCallName = toolCallName;
134 existing.toolCallArgs = toolCallArgs;
135 } else {
136 capturedToolCalls.push({ toolCallId, toolCallName, toolCallArgs });
137 }
138 };
139
140 const subscriber: AgentSubscriber = {
141 // ── 1. Text streaming ──────────────────────────────────────────────

Callers 3

onToolCallStartEventFunction · 0.70
onToolCallArgsEventFunction · 0.70
onToolCallEndEventFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…