---
title: ToolCallEvaluator
framework: evaluations
role: symbol
role_heading: Structure
path: evaluations/toolcallevaluator
---

# ToolCallEvaluator

An evaluator that verifies agentic tool calls against an expected trajectory.

## Declaration

```swift
struct ToolCallEvaluator<Input> where Input : ModelSampleProtocol, Input.Expectation == TrajectoryExpectation
```

## Mentioned in

Evaluating tool-calling behavior Evaluating language model responses

## Overview

Overview Produces both a strict and partial result from a single evaluation pass. Supports ordered sequences, unordered expectations, disallowed tool checks, and group steps. let toolsAllPass = Metric("Tools All Pass") let toolsPercentagePass = Metric("Tools Percentage Pass")

let evaluator = ToolCallEvaluator<ModelSample<String>>(     allPass: toolsAllPass, percentagePass: toolsPercentagePass )

## Topics

### Initializers

- [init(allPass:percentagePass:)](evaluations/toolcallevaluator/init(allpass:percentagepass:).md)
- [init(allPass:percentagePass:argumentMatchModel:)](evaluations/toolcallevaluator/init(allpass:percentagepass:argumentmatchmodel:).md)

### Instance Properties

- [allPass](evaluations/toolcallevaluator/allpass.md)
- [percentagePass](evaluations/toolcallevaluator/percentagepass.md)

## Relationships

### Conforms To

- [EvaluatorProtocol](evaluations/evaluatorprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Tool-call evaluation

- [Evaluating tool-calling behavior](evaluations/evaluating-tool-calling-behavior.md)
- [TrajectoryExpectation](evaluations/trajectoryexpectation.md)
- [ArgumentMatcher](evaluations/argumentmatcher.md)
