-
-
Notifications
You must be signed in to change notification settings - Fork 100
Drop schema compiler to use Dry's #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Almir Davletov <davletovalmir@gmail.com>
|
I would personally also add:
Otherwise, thanks for working on this! ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces FastMCP's custom schema compiler with Dry Schema's built-in JSON schema extension to simplify the codebase. The custom SchemaCompiler class has been entirely removed in favor of using Dry Schema's native JSON schema generation with enhanced metadata handling for descriptions and hidden properties.
Key changes:
- Removed the custom SchemaCompiler class and related modules
- Added Dry Schema JSON extension and metadata processing system
- Enhanced test coverage for schema metadata features
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/mcp/tool_spec.rb | Updated test expectations and added comprehensive test coverage for metadata features |
| spec/mcp/schema_compiler_spec.rb | Removed all tests as SchemaCompiler class was deleted |
| lib/mcp/tool.rb | Replaced SchemaCompiler with Dry Schema extension and new metadata processor |
| examples/tool_examples.rb | Added examples demonstrating metadata features |
| examples/rack_middleware.rb | Added example tool with nested hash structure |
| README.md | Minor formatting and content improvements |
| .rubocop.yml | Updated string literal style to use double quotes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
examples/rack_middleware.rb
Outdated
| end | ||
| end | ||
|
|
||
| class DisplayUserAdressTool < FastMcp::Tool |
Copilot
AI
Sep 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class name contains a typo: 'DisplayUserAdressTool' should be 'DisplayUserAddressTool' (missing 's' in 'Address').
| class DisplayUserAdressTool < FastMcp::Tool | |
| class DisplayUserAddressTool < FastMcp::Tool |
I still need to test this out. Turns out it's way simpler than expected.