---
title: "init(ordered:unordered:disallowed:)"
framework: evaluations
role: symbol
role_heading: Initializer
path: "evaluations/trajectoryexpectation/init(ordered:unordered:disallowed:)"
---

# init(ordered:unordered:disallowed:)

Creates a trajectory expectation with ordered and unordered requirements, plus specific tools that must not be called.

## Declaration

```swift
init(ordered: [ToolExpectation] = [], unordered: [ToolExpectation] = [], disallowed: [ToolExpectation])
```

## Parameters

- `ordered`: Steps that must be satisfied in sequential order.
- `unordered`: Tool calls that must occur at some point, regardless of position.
- `disallowed`: Tools that must NOT be called.

## Discussion

Discussion Additional tool calls beyond the expected ones are always allowed when using disallowed expectations — the disallowed list targets specific tools while permitting everything else. To disallow all unexpected calls instead, use init(ordered:unordered:allowsAdditionalToolCalls:) with allowsAdditionalToolCalls: false.

## See Also

### Creating multi-tool expectations

- [init(ordered:unordered:allowsAdditionalToolCalls:)](evaluations/trajectoryexpectation/init(ordered:unordered:allowsadditionaltoolcalls:).md)
- [init(unordered:)](evaluations/trajectoryexpectation/init(unordered:).md)
