Add structured output/output schema support for server-side tools. (#480)
* Add structured output/output schema support for server-side tools. * Address feedback. * Add McpServerToolAttribute.UseStructuredContent --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
46d25b7558
commit
fa017c04c3
1 changed files with 310 additions and 20 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol;
|
||||
|
|
@ -27,6 +28,12 @@ public class CallToolResponse
|
|||
[JsonPropertyName("content")]
|
||||
public List<Content> Content { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional JSON object representing the structured result of the tool call.
|
||||
/// </summary>
|
||||
[JsonPropertyName("structuredContent")]
|
||||
public JsonNode? StructuredContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an indication of whether the tool call was unsuccessful.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue