MCPcopy Index your code
hub / github.com/TanStack/ai / toolCallStateChanged

Function toolCallStateChanged

packages/ai-client/src/events.ts:119–137  ·  view source on GitHub ↗

* Emit tool call state change events (combines processor and client events)

(
    streamId: string,
    messageId: string,
    toolCallId: string,
    toolName: string,
    state: string,
    args: string,
    context?: ChatClientRunEventContext,
  )

Source from the content-addressed store, hash-verified

117 * Emit tool call state change events (combines processor and client events)
118 */
119 toolCallStateChanged(
120 streamId: string,
121 messageId: string,
122 toolCallId: string,
123 toolName: string,
124 state: string,
125 args: string,
126 context?: ChatClientRunEventContext,
127 ): void {
128 this.emitEvent('tools:call:updated', {
129 streamId,
130 messageId,
131 toolCallId,
132 toolName,
133 state,
134 arguments: args,
135 ...context,
136 })
137 }
138
139 /**
140 * Emit tool result state change event

Callers

nothing calls this directly

Calls 1

emitEventMethod · 0.45

Tested by

no test coverage detected