Skip to content

Interface: OrderedToolCall

@providerprotocol/agents


@providerprotocol/agents / index / OrderedToolCall

Defined in: src/execution/types.ts:552

Model-driven tool call with optional execution order hint.

Extends the standard ToolCall with an after field that models can use to signal dependencies between specific tool call instances. This enables fine-grained ordering beyond tool-level dependencies.

UAP-1.0 Spec Section 8.6

// Model might return tool calls like:
const toolCalls: OrderedToolCall[] = [
{ toolCallId: 'call-1', toolName: 'read', arguments: { path: 'a.txt' } },
{ toolCallId: 'call-2', toolName: 'read', arguments: { path: 'b.txt' } },
{
toolCallId: 'call-3',
toolName: 'merge',
arguments: {},
after: ['call-1', 'call-2'], // Wait for both reads
},
];
  • ToolCall

optional after: string[]

Defined in: src/execution/types.ts:554

Tool call IDs that must complete before this call executes


arguments: Record<string, unknown>

Defined in: node_modules/@providerprotocol/ai/dist/index.d.ts:151

ToolCall.arguments


toolCallId: string

Defined in: node_modules/@providerprotocol/ai/dist/index.d.ts:149

ToolCall.toolCallId


toolName: string

Defined in: node_modules/@providerprotocol/ai/dist/index.d.ts:150

ToolCall.toolName