<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/Transcript/ToolOutput/init(id:toolName:segments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels10TranscriptV10ToolOutputV2id8toolName8segmentsAESS_SSSayAC7SegmentOGtcfc"
  },
  "title" : "init(id:toolName:segments:)"
}
-->

# init(id:toolName:segments:)

Creates a tool output that provides the result of a tool call back to the model.

```
init(id: String, toolName: String, segments: [Transcript.Segment])
```

## Parameters

`id`

A unique identifier for the tool output.

`toolName`

The name of the tool that produced the output.

`segments`

The segments that make up the output.

---

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)