Skip to content

textToNativeToolCalls

textToNativeToolCalls(text, options): NativeToolCall[] | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/toolCallRepair/promote.ts:64

Parse assistant text as one-or-more STANDALONE text-emitted tool calls and return them as native LangChain tool_calls, or undefined when the text is not a standalone call, names a tool outside the allow-list, or exceeds the payload cap. Fresh ids are minted per call (the model emitted none). Empty allow-list ⇒ undefined (never promote).

string | undefined

TextToolCallRepairOptions

NativeToolCall[] | undefined