ToolResultToStringAnalyzer
NexusLabs.Foundry.MicrosoftAgentFramework.Analyzers¶
ToolResultToStringAnalyzer Class¶
Detects .ToString() invocations on ToolCallResult.Result and
FunctionResultContent.Result properties, which are object?
and may contain a JsonElement at runtime.
Inheritance Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer 🡒 ToolResultToStringAnalyzer
Remarks¶
\<b>FDRYMAF015\</b> (Warning): Calling ToString() on these properties
produces a C# type name for complex objects instead of JSON. Developers
should use ToolResultSerializer.Serialize() instead.