A tool call extracted from model output
for (const tc of result.toolCalls) { const args = JSON.parse(tc.arguments); await executeTool(tc.name, args);} Copy
for (const tc of result.toolCalls) { const args = JSON.parse(tc.arguments); await executeTool(tc.name, args);}
JSON string of arguments
Tool call ID (may be empty depending on model format)
Tool/function name
A tool call extracted from model output
Example