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
|
|
@ -240,4 +240,13 @@ public sealed class McpServerToolAttribute : Attribute
|
|||
get => _readOnly ?? ReadOnlyDefault;
|
||||
set => _readOnly = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the tool should report an output schema for structured content.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// When enabled, the tool will attempt to populate the <see cref="Tool.OutputSchema"/>
|
||||
/// and provide structured content in the <see cref="CallToolResponse.StructuredContent"/> property.
|
||||
/// </remarks>
|
||||
public bool UseStructuredContent { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue