inline_method
Inline a method call by replacing it with the method body. Specify the file and zero-based line/column of the call to apply the edit.
Instructions
Inline a method call by replacing it with the method body.
Returns the text edit needed to inline the method call. The caller should apply this edit to perform the inlining.
USAGE: Position cursor on a method call OUTPUT: Edit to replace call with method body
IMPORTANT: Uses ZERO-BASED coordinates.
LIMITATIONS:
Method must be in the same project (source available)
Works best with simple methods (no complex control flow)
Single return statement is handled, multiple returns may need review
Requires load_project to be called first.
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": {
"filePath": "<filePath>",
"line": "<line>",
"column": "<column>"
},
"name": "inline_method"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Zero-based line number of method call | |
| column | Yes | Zero-based column number (on method name) | |
| filePath | Yes | Path to source file containing the method call |