[external]
Views the source code of external symbols (types, methods, properties) from NuGet packages or framework assemblies. Attempts SourceLink resolution first, then falls back to ILSpy decompilation.
| Name | Type | Required | Description |
|---|---|---|---|
| symbolName | string | Yes | Name of the symbol to look up (simple or fully qualified). |
| assemblyHint | string | No | Assembly name hint to filter results when multiple matches exist. |
| projectName | string | No | Optional project name to limit the search scope. |
View JsonSerializer source
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "view_external_definition",
"arguments": {
"symbolName": "JsonSerializer"
}
}
}{
"success": true,
"data": {
"symbolName": "JsonSerializer",
"symbolKind": "Class",
"assemblyName": "System.Text.Json",
"assemblyVersion": "9.0.0.0",
"sourceOrigin": "SourceLink",
"sourceUrl": "https://raw.githubusercontent.com/...",
"sourceCode": "public static class JsonSerializer { ... }",
"language": "C#"
},
"error": null
}View with assembly hint
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "view_external_definition",
"arguments": {
"symbolName": "JsonSerializer",
"assemblyHint": "System.Text.Json"
}
}
}{
"success": true,
"data": {
"symbolName": "JsonSerializer",
"symbolKind": "Class",
"assemblyName": "System.Text.Json",
"assemblyVersion": "9.0.0.0",
"sourceOrigin": "SourceLink",
"sourceUrl": "https://raw.githubusercontent.com/...",
"sourceCode": "public static class JsonSerializer { ... }",
"language": "C#"
},
"error": null
}Returns source code, assembly info, and source origin (SourceLink or decompiled)
Go to Playground to test this tool interactively.