Skip to content

Commit cf32308

Browse files
Copilotstephentoub
andcommitted
Add OutputSchema property to McpServerToolCreateOptions and McpServerToolAttribute
Adds support for specifying the output schema type independently of the return type for tools returning CallToolResult. This allows developers to advertise a meaningful OutputSchema in tools/list while still having full control over the CallToolResult response (Meta, IsError, StructuredContent). - Add `JsonElement? OutputSchema` property to McpServerToolCreateOptions - Add `Type? OutputSchema` property to McpServerToolAttribute - DeriveOptions converts the attribute's Type to a JSON schema - CreateOutputSchema uses explicit OutputSchema over AIFunction's return schema - Add 13 comprehensive tests covering all variations Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent cdf6b4b commit cf32308

5 files changed

Lines changed: 5785 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)