Repository navigation
Conversation
## Motivation and Context `MCP::Client#list_tools` built each `MCP::Client::Tool` from `name`, `description`, `inputSchema`, `outputSchema`, and `annotations`, and dropped the other members of the specification's `Tool` object: `title` and `_meta` (2025-06-18) and `icons` and `execution` (2025-11-25). Extensions put what a host needs under `_meta`: MCP Apps (SEP-1865) names a tool's app under `_meta.ui`, so a host on this client could not tell which tools have an app without a second raw `tools/list` of its own (modelcontextprotocol#640). The TypeScript and Python clients keep all four on their `Tool` types, and this SDK's own `MCP::Tool` already serves `title`, `icons`, and `_meta`. `MCP::Client::Tool` now keeps the four as the server sent them, the way `annotations` is kept, behind `title`, `icons`, `execution`, and `meta` readers; `list_tools` passes them through, and a member a tool omits reads as nil. The SDK gives none of them a meaning of its own: `execution` carries the task-support hint of SEP-1686, which this SDK does not act on yet, and `_meta` keys belong to the extensions that define them. The client page notes that all four are untrusted input from the server, which the SDK does not act on. Closes modelcontextprotocol#640. ## How Has This Been Tested? test/mcp/client/tool_test.rb and test/mcp/client_test.rb, which read the four members back from a `tools/list` answer carrying the MCP Apps `_meta.ui` shape and see nil when a tool omits them. At d518025 the readers raise `NoMethodError` and `MCP::Client::Tool.new` refuses the keywords. ## Breaking Changes None. The new keywords of `MCP::Client::Tool#initialize` default to nil.
atesgoral
approved these changes
Oct 30, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
MCP::Client#list_toolsbuilt eachMCP::Client::Toolfromname,description,inputSchema,outputSchema, andannotations, and dropped the other members of the specification'sToolobject:titleand_meta(2025-06-18) andiconsandexecution(2025-11-25). Extensions put what a host needs under_meta: MCP Apps (SEP-1865) names a tool's app under_meta.ui, so a host on this client could not tell which tools have an app without a second rawtools/listof its own (#640). The TypeScript and Python clients keep all four on theirTooltypes, and this SDK's ownMCP::Toolalready servestitle,icons, and_meta.MCP::Client::Toolnow keeps the four as the server sent them, the wayannotationsis kept, behindtitle,icons,execution, andmetareaders;list_toolspasses them through, and a member a tool omits reads as nil. The SDK gives none of them a meaning of its own:executioncarries the task-support hint of SEP-1686, which this SDK does not act on yet, and_metakeys belong to the extensions that define them.The client page notes that all four are untrusted input from the server, which the SDK does not act on.
Closes #640.
How Has This Been Tested?
test/mcp/client/tool_test.rb and test/mcp/client_test.rb, which read the four members back from a
tools/listanswer carrying the MCP Apps_meta.uishape and see nil when a tool omits them. At d518025 the readers raiseNoMethodErrorandMCP::Client::Tool.newrefuses the keywords.Breaking Changes
None. The new keywords of
MCP::Client::Tool#initializedefault to nil.Types of changes
Checklist