ai.internal._proxy

(internal) A tools/call proxy bound to one tool name. A helper function rather than an inline closure in the tools() loop: a closure in a loop captures the loop variable's slot, so every tool would proxy the last catalog entry; a parameter is a fresh binding per call.

Reference version

Signature

function ai.internal._proxy(
name: string
) -> (map<string, unknown>) -> string throws unknown

(internal) A tools/call proxy bound to one tool name. A helper function rather than an inline closure in the tools() loop: a closure in a loop captures the loop variable's slot, so every tool would proxy the last catalog entry; a parameter is a fresh binding per call.

Source:<builtin>/ai/ns_internal/mcp.bamlbytes 391592