<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/SpotlightSearchTool/Guide/format",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:31_CoreSpotlight_FoundationModels0B10SearchToolV5GuideV6formatAC11FormatLevelOvp"
  },
  "title" : "format"
}
-->

# format

The representation format for tool responses returned to the model.

```
let format: SpotlightSearchTool.FormatLevel
```

## Discussion

Controls how search results are serialized in the model’s context window.
Use [`SpotlightSearchTool.FormatLevel.compact`](/documentation/CoreSpotlight/SpotlightSearchTool/FormatLevel/compact) to reduce token consumption when
working with small-context models or long conversations.

---

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)