<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/ToolCallEvaluator/init(allPass:percentagePass:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations17ToolCallEvaluatorV7allPass010percentageF0ACyxGAA6MetricV_AHtcfc"
  },
  "title" : "init(allPass:percentagePass:)"
}
-->

# init(allPass:percentagePass:)

Creates a new tool-call expectations evaluator.

```
init(allPass: Metric, percentagePass: Metric)
```

## Parameters

`allPass`

The metric for the strict pass or fail result.

`percentagePass`

The metric for the partial score result.

## Discussion

The evaluator evaluates expectations once and produces two columns:
a strict score (pass or fail) and a partial score (proportion matched).

```swift
let allPassMetric = Metric("Tools All Pass")
let percentagePassMetric = Metric("Tools Percentage Pass")

let evaluator = ToolCallEvaluator<ModelSample<String>>(
    allPass: allPassMetric,
    percentagePass: percentagePassMetric
)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)