Skip to content

refactor: reformat McpSchema.java and reorganize imports#392

Closed
tzolov wants to merge 4 commits intomainfrom
fix-mcp-schema-formatting
Closed

refactor: reformat McpSchema.java and reorganize imports#392
tzolov wants to merge 4 commits intomainfrom
fix-mcp-schema-formatting

Conversation

@tzolov
Copy link
Copy Markdown
Contributor

@tzolov tzolov commented Jul 13, 2025

  • Remove unused imports (CallToolResult, TextContent)
  • Standardize code formatting and indentation throughout
  • Adjust formatter comments positioning
  • Improve readability of record definitions and builder classes

Reformat McpSchema.java and reorganize imports for improved code consistency and readability

Motivation and Context

This change improves code maintainability and consistency by:

  • Standardizing code formatting throughout the McpSchema.java file
  • Organizing imports in a logical order (SLF4J imports moved to top)
  • Removing unused imports to reduce clutter
  • Ensuring consistent indentation and brace positioning across all record definitions and builder classes

How Has This Been Tested?

  • Existing unit tests should continue to pass as no functional changes were made
  • Code compilation verified to ensure no syntax errors introduced
  • Import organization verified to maintain all necessary dependencies

Breaking Changes

No breaking changes - this is purely a formatting and import organization change with no functional modifications.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

This refactoring focuses solely on code style and organization:

  • Applied consistent formatting to record definitions, builder classes, and enum declarations
  • Adjusted @formatter:off/on comment positioning for better code structure
  • Removed unused imports and Moved SLF4J Logger imports to the top of the import block for better organization
  • No functional logic was modified, ensuring backward compatibility

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants