<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppIntent(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Macro",
  "symbol" : {
    "kind" : "Macro",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6IntentyyAA0aC6TraitsVcfm"
  },
  "title" : "AppIntent(_:)"
}
-->

# AppIntent(_:)

Makes an existing app intent available to Siri as a tool.

```
@attached(extension, conformances: ToolIntent) macro AppIntent(_ traits: AppIntentTraits)
```

## Parameters

`traits`

The intent’s roles, such as `.tool` or `[.tool]`.

## Overview

Apply this macro to a structure or class that conforms to [`AppIntent`](/documentation/AppIntents/AppIntent).
It adds a [`ToolIntent`](/documentation/AppIntents/ToolIntent) conformance, using the availability declared on the
type, or the availability of `ToolIntent` when the type declares none.

```swift
@AppIntent(.tool)
struct SearchFlights { ... }
```

---

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)