roslyn:get_method_source
Retrieve the full source code of any C# method by specifying its type and method name, eliminating the need to manually read source files.
Instructions
Get the actual source code of a method by type and method name. Eliminates need for file Read.
USAGE: get_method_source(typeName="MyService", methodName="ProcessData") OUTPUT: Full method source including signature, body, location (file + line numbers), and line count.
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": {
"typeName": "<typeName>",
"methodName": "<methodName>"
},
"name": "roslyn:get_method_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| typeName | Yes | The containing type name (e.g., 'MyService', 'MyController') | |
| methodName | Yes | The method name (e.g., 'ProcessData') | |
| overloadIndex | No | Which overload to get (0-based, default: 0) |