Open Agent Loops
API Reference

ToolArguments

@open-agent-loops/core


type ToolArguments = Record<string, unknown>;

Defined in: types/tool-calls.ts:89

Tool-call arguments parsed into an object.

Remarks

The form handed off to observers, hooks, and the gate (the wire form on ToolCall.function.arguments is a JSON string). Always an object: function-calling schemas are JSON Schema objects, so parsed arguments are keyed values. The value types aren't known at the loop level (each tool has its own schema), hence unknown per key — a tool's own execute gets them fully typed as z.infer<schema>.

Abstraction over — JSON.parse(toolCall.function.arguments). Not a wire type of its own: the wire carries the string on ToolCall.function; this is that string parsed, on its way to a tool's execute.

Example

From the wire string to a parsed `ToolArguments`

// on the wire — ToolCall.function.arguments is a JSON *string*:
"{\"city\":\"NYC\",\"units\":\"metric\"}"
// parsed into a ToolArguments object:
{ "city": "NYC", "units": "metric" }

On this page