roslyn:get_generated_code
Retrieve the full source code of a generated file from a .NET source generator to inspect or debug its output.
Instructions
View the source code produced by a source generator.
USAGE: get_generated_code(projectName: "MyApp", generatedFileName: "MyType.g.cs")
OUTPUT: Full source code of the generated file. Use get_source_generators first to discover available generated files.
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": {
"projectName": "<projectName>",
"generatedFileName": "<generatedFileName>"
},
"name": "roslyn:get_generated_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | Yes | Project containing the generated file | |
| generatedFileName | Yes | Name of the generated file |