fix(mcp): tolerate invalid output schema - #2075
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesMCP output schema handling
Estimated code review effort: 2 (Simple) | ~10 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
Summary
Root cause
The built-in McDonald's MCP server returns an invalid output schema for
mall-order-listat#/properties/data/items/properties/list/items/properties/type. The previous validation path rejected the entire tool list because of this optional field.Validation
pnpm exec vitest run --config vitest.config.ts test/main/mcp/schemaValidation.test.tspnpm exec vitest run --config vitest.config.ts test/main/mcp/mcpClient.test.tspnpm run typecheck:nodepnpm run lintpnpm run i18npnpm exec oxfmt --check src/main/mcp/schemaValidation.ts test/main/mcp/schemaValidation.test.tsSummary by CodeRabbit