<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FoundationModels",
  "identifier" : "/documentation/FoundationModels/DynamicInstructionsBuilder",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation Models"
    ],
    "preciseIdentifier" : "s:16FoundationModels26DynamicInstructionsBuilderV"
  },
  "title" : "DynamicInstructionsBuilder"
}
-->

# DynamicInstructionsBuilder

A result builder that combines tools and other content into dynamic instructions.

```
@resultBuilder struct DynamicInstructionsBuilder
```

## Topics

### Building dynamic instructions

[`static func buildBlock() -> EmptyDynamicInstructions`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildBlock())

Creates a builder with an empty block.

[`static buildBlock(_:)`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildBlock(_:))

Creates a builder with a block.

[`static func buildEither<TrueContent, FalseContent>(first: TrueContent) -> ConditionalDynamicInstructions<TrueContent, FalseContent>`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildEither(first:))

Creates a builder with the first component.

[`static func buildEither<TrueContent, FalseContent>(second: FalseContent) -> ConditionalDynamicInstructions<TrueContent, FalseContent>`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildEither(second:))

Creates a builder with the second component.

[`static buildExpression(_:)`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildExpression(_:))

Creates a builder with a list of tools expression.

[`static func buildOptional<Content>(Content?) -> Content?`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildOptional(_:))

Creates a builder with an optional component.

[`static func buildLimitedAvailability(some DynamicInstructions) -> AnyDynamicInstructions`](/documentation/FoundationModels/DynamicInstructionsBuilder/buildLimitedAvailability(_:))

Creates a builder with limited availability dynamic instructions.



---

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)