<!--
{
  "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(_:schema:)",
  "metadataVersion" : "0.1.0",
  "role" : "Macro",
  "symbol" : {
    "kind" : "Macro",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6Intent_6schemayAA0aC6TraitsV_xtcAA0a6SchemaC0Rzlufm"
  },
  "title" : "AppIntent(_:schema:)"
}
-->

# AppIntent(_:schema:)

Makes an app intent that conforms to a schema available to Siri as a tool.

```
@attached(memberAttribute) @attached(extension, conformances: ToolIntent, AppIntent, AssistantSchemaIntent, ShowInAppSearchResultsIntent, OpenIntent, DeleteIntent, AudioPlaybackIntent, AudioRecordingIntent, LiveActivityIntent, URLRepresentableIntent, names: named(__appSchemaIntent)) macro AppIntent<T>(_ traits: AppIntentTraits, schema: T) where T : AppSchemaIntent
```

## Parameters

`traits`

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

`schema`

The schema the intent conforms to.

## Overview

Use this macro in place of `@AppIntent(schema:)`. It adds everything
`@AppIntent(schema:)` adds, plus a [`ToolIntent`](/documentation/AppIntents/ToolIntent) conformance:

```swift
@AppIntent(.tool, schema: .journal.createEntry)
struct CreateEntryIntent {
    var title: String?
    var message: AttributedString
    // ...
}
```

Only schemas available exclusively in Shortcuts are supported. Schemas in
primary domains, such as `.messages.sendMessage`, are already handled by
Siri, and using one here is an error.

---

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)