[analysis]
Gets source code for a type (bounded by max lines).
Try this tool in Playground.
| Name | Type | Required | Description |
|---|---|---|---|
| typeName | string | Yes | Type name (simple or fully qualified). |
| projectName | string | No | Optional project name filter. |
| maxLines | number | No | Max lines to return. Use 0 for unlimited. Default is 200. |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). |
| timeout_ms | number | No | Timeout in milliseconds. Use 0 to disable. Default is 30000. |
Get type source
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_type_source",
"arguments": {
"typeName": "UserService"
}
}
}{
"success": true,
"data": {
"typeName": "UserService",
"fullName": "MyApp.Services.UserService",
"kind": "Class",
"filePath": "/path/to/UserService.cs",
"startLine": 1,
"endLine": 120,
"lineCount": 120,
"truncated": true,
"source": "..."
},
"error": null
}Returns type source (possibly truncated)