Skip to content

Function: hasCallDependencies()

@providerprotocol/agents


@providerprotocol/agents / index / hasCallDependencies

hasCallDependencies(toolCalls): boolean

Defined in: src/execution/tool-ordering.ts:262

Checks if any tool calls have model-driven dependencies.

Models can specify execution order hints via the after field on tool calls. This function checks if any calls have such hints.

ToolCall[]

Tool calls to check

boolean

true if any call has the after field set

import { hasCallDependencies } from '@providerprotocol/agents/execution';
if (hasCallDependencies(toolCalls) || hasToolDependencies(tools)) {
// Need dependency-aware execution
const groups = orderToolCalls(toolCalls, tools);
}