Extract Type
extractTypeExtract inline type annotations into named type aliases for reuse. Select the type span, then rename the new type as needed.
Instructions
Extract an inline type annotation into a named type alias. Select the type span to extract. The response includes renameFilename/renameLocation so you can follow up with rename_symbol to give the type a meaningful name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"startLine": "<startLine>",
"startOffset": "<startOffset>",
"endLine": "<endLine>",
"endOffset": "<endOffset>",
"preview": "<preview>"
},
"name": "extractType"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path (absolute or relative to cwd) | |
| endLine | Yes | 1-based end line | |
| preview | Yes | If true, only preview changes | |
| endOffset | Yes | 1-based end character offset | |
| startLine | Yes | 1-based start line | |
| startOffset | Yes | 1-based start character offset |