Normalize CallToolResult.StructuredContent to JsonElement?#1357
Normalize CallToolResult.StructuredContent to JsonElement?#1357stephentoub merged 8 commits intomainfrom
Conversation
…ent? to match ToolResultContentBlock.StructuredContent Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
…efault Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
|
This is looking good to me. @copilot Can you confirm for me please any remaining |
After these changes, the only remaining
These are intentionally |
src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs
Outdated
Show resolved
Hide resolved
src/ModelContextProtocol.Core/Server/AIFunctionMcpServerTool.cs
Outdated
Show resolved
Hide resolved
… to JsonElement conversion Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
After these changes, the only remaining
These are intentionally |
halter73
left a comment
There was a problem hiding this comment.
This does feel a bit more consistent with Tool.OutputSchema which I think is good. I don't claim to be an authority on this though.
CallToolResult.StructuredContentfromJsonNode?toJsonElement?AIFunctionMcpServerTool.CreateStructuredResponseto returnJsonElement?instead ofJsonNode?CreateStructuredResponseswitch to targetJsonElement?directly, only usingJsonNodefor the wrapping pathJsonSerializer.SerializeToElementinstead of.Deserialize()for JsonNode/JsonObject → JsonElement conversionAIFunctionMcpServerTool.ConvertAIContentEnumerableToCallToolResultparameter typeCallToolResultTests.cs,UnknownPropertiesTests.cs,McpClientToolTests.cs,McpServerToolTests.cs💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.