---
title: "writingToolsCoordinator(_:requestsGrammarResultsFor:completion:)"
framework: AppKit
role: symbol
role_heading: Instance Method
platforms: [macOS 27.0+]
path: "appkit/nswritingtoolscoordinator/delegate-swift.protocol/writingtoolscoordinator(_:requestsgrammarresultsfor:completion:)"
---

# writingToolsCoordinator(_:requestsGrammarResultsFor:completion:)

Asks the delegate for information about grammar issues in the specified context.

## Declaration

```swift
optional func writingToolsCoordinator(_ writingToolsCoordinator: NSWritingToolsCoordinator, requestsGrammarResultsFor context: NSWritingToolsCoordinator.Context, completion: @escaping @Sendable ([NSTextCheckingResult]) -> Void)
```

```swift
optional func writingToolsCoordinator(_ writingToolsCoordinator: NSWritingToolsCoordinator, grammarResultsFor context: NSWritingToolsCoordinator.Context) async -> [NSTextCheckingResult]
```

## Discussion

Discussion To support the grammar presentation UI, the delegate should provide information about the identified and currently indicated grammar issues in the specified context. The elements of the results array should be NSTextCheckingResult objects of grammar type, of the sort that are returned from grammar checking, with ranges relative to the context. If you use grammar presentation, you must implement this delegate method to provide them.
