You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c8847ac
Browse filesBrowse the repository at this point in the historyBrowse files
Keep a tool's _meta, title, icons, and execution on the client
## 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 (#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#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.
0 commit comments