Release v2.0.0 (#1758)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a8fe8421-1ce4-4a57-b4c4-3ada2d8ac67c
This commit is contained in:
parent
e8b80f0e6d
commit
15f8b2da11
1 changed files with 26 additions and 16 deletions
|
|
@ -139,6 +139,16 @@ public static IEnumerable<ContentBlock> DescribeImage()
|
|||
}
|
||||
```
|
||||
|
||||
#### Structured content
|
||||
|
||||
Set `UseStructuredContent = true` on <xref:ModelContextProtocol.Server.McpServerToolAttribute> or
|
||||
<xref:ModelContextProtocol.Server.McpServerToolCreateOptions> to advertise an output schema and
|
||||
serialize the return value into <xref:ModelContextProtocol.Protocol.CallToolResult.StructuredContent>.
|
||||
The output schema may be any JSON Schema 2020-12 document. Non-object return values are represented
|
||||
directly, so a tool returning `72` produces `structuredContent: 72`, not
|
||||
`structuredContent: { "result": 72 }`. Clients should read the value according to the advertised
|
||||
output schema rather than assuming a `result` wrapper.
|
||||
|
||||
#### Content annotations
|
||||
|
||||
Any content block can include <xref:ModelContextProtocol.Protocol.Annotations> to provide hints about the intended audience and priority:
|
||||
|
|
|
|||
Loading…
Reference in a new issue