python-sdk
python-sdk copied to clipboard
fix mcp.types.Tool is not following python's naming convention snake_case
Renamed the inputSchema field to input_schema in the Tool class to align with Python's naming conventions (snake_case). Added an alias inputSchema for backward compatibility.
Motivation and Context
The name inputSchema does not follow Python's naming convention (PEP 8). This change improves code readability and consistency. Fix related: #97
How Has This Been Tested?
Tested locally by running existing tests.
Breaking Changes
- [X] Yes. Users will need to update references to the
inputSchemafield toinput_schema. Adding an alias is intended to ease the migration.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
Checklist
- [X] I have read the MCP Documentation
- [X] My code follows the repository's style guidelines
- [X] New and existing tests pass locally
- [X] I have added appropriate error handling
- [X] I have added or updated documentation as needed
Additional context
The addition of the inputSchema alias is intended to provide backward compatibility and facilitate the migration process for users.