Get type info / docs at a Swift source position
swiftGetHoverInfoReturns SourceKit-LSP hover info and declaration fragment at a given position to help identify retain cycles and disambiguate self captures.
Instructions
[mg.code] SourceKit-LSP textDocument/hover at a (line, character) position. Returns the markdown / plaintext hover content plus a best-effort extracted declaration fragment. Use to disambiguate self captures: a class self in a closure can leak; a struct self can't.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to a Swift source file. | |
| line | Yes | Zero-based line number (LSP convention). | |
| character | Yes | Zero-based UTF-16 character offset within the line. | |
| projectRoot | No |