feat: add server-side support for tool outputSchema with backward compatibility
- Update McpServer to support registering tools with outputSchema - Add automatic content generation from structuredContent for backward compatibility - Add validation to ensure proper usage of structuredContent vs content - Add comprehensive tests for outputSchema functionality - Add example servers demonstrating structured output usage - Update existing test to match new backward compatibility behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
882e0b7d05
commit
bb28098d81
1 changed files with 987 additions and 100 deletions
|
|
@ -858,7 +858,8 @@ describe("tool()", () => {
|
|||
);
|
||||
|
||||
expect(result.structuredContent).toBeDefined();
|
||||
expect(result.content).toBeUndefined(); // Should not have content when structuredContent is used
|
||||
// For backward compatibility, content is auto-generated from structuredContent
|
||||
expect(result.content).toBeDefined();
|
||||
|
||||
const structuredContent = result.structuredContent as {
|
||||
processedInput: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue