Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Jan 12, 2026

Motivation and Context

Previously, the icons parameter was always included in responses (as an empty array) even when not configured. This differs from the response representation in MCP Ruby SDK 0.4.0.

Since icons is optional, it should be omitted from responses when unused to reduce unnecessary context window usage.
https://modelcontextprotocol.io/specification/2025-11-25/schema#implementation

This fix applies to Tool#to_h, Prompt#to_h, Resource#to_h, ResourceTemplate#to_h, and Server#server_info.

It doesn't seem critical, but if there are no other issues, it would be good to cut 0.5.1 bugfix release soon.

How Has This Been Tested?

New tests have been added and Existing tests have been updated.

Breaking Changes

None.

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

Previously, the `icons` parameter was always included in responses (as an empty array)
even when not configured. This differs from the response representation in MCP Ruby SDK 0.4.0.

Since `icons` is optional, it should be omitted from responses when unused to reduce
unnecessary context window usage.
https://modelcontextprotocol.io/specification/2025-11-25/schema#implementation

This fix applies to `Tool#to_h`, `Prompt#to_h`, `Resource#to_h`, `ResourceTemplate#to_h`,
and `Server#server_info`.

It doesn't seem critical, but if there are no other issues, it would be good to cut 0.5.1 bugfix release soon.
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.

1 participant