A collection of tools for Apple's Foundation Models Framework that enable you to interact with system frameworks and external services.
FoundationModelsTools provides a set of pre-built tools that extend the capabilities of AI models using Apple's Foundation Models Framework. These tools allow you to:
- Access and manage calendar events
- Read and create contacts
- Get health data from HealthKit
- Access location services
- Control music playback
- Manage reminders
- Fetch weather information
- Extract metadata from web pages
- Search the web using Exa AI
- macOS 26.0+
- iOS 26.0+
- Swift 6.2+
- Xcode 26.0+
Add FoundationModelsTools as a dependency in your Package.swift:
dependencies: [
.package(url: "https://github.com/rudrankriyam/FoundationModelsTools", from: "0.1.0")
]Access and manage calendar events. Requires Calendar entitlement.
Search, read, and create contacts. Requires Contacts entitlement.
Access health data from HealthKit. Requires HealthKit entitlement.
Get current location, geocode addresses, and calculate distances. Requires Location Services entitlement.
Control music playback and access music library. Requires Apple Music access.
Create, read, update, and complete reminders. Requires Reminders entitlement.
Fetch weather information using WeatherKit. Requires WeatherKit entitlement.
Extract metadata from web pages using LinkPresentation framework.
Search the web using Exa AI. Requires Exa API key.
Some tools require API keys or special entitlements:
- WebTool: Requires an Exa API key stored in
@AppStorage("exaAPIKey") - WeatherTool: Requires WeatherKit entitlement
- HealthTool: Requires HealthKit capabilities and usage descriptions