ruby-sdk/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Koichi ITO 73070f1fd7 Allow Client#call_tool to accept a tool name
## Motivation and Context

`Client#call_tool` previously required an `MCP::Client::Tool` object to call a tool.
This made the API harder to use compared to other MCP SDK implementations,
which accept a tool name string directly:

- Python SDK: `session.call_tool(name, arguments)` accepts a name string.
  https://github.com/modelcontextprotocol/python-sdk/blob/v1.26.0/src/mcp/client/session.py#L370
- TypeScript SDK: `client.callTool({ name, arguments })` accepts a name string.
  ccb78f2/packages/client/src/client/client.ts (L834)

## How Has This Been Tested?

Updated existing tests and added new tests.

## Breaking Change

No. This change adds a `name:` parameter so callers can pass a tool name string
directly without looking up a `Tool` object first. The existing `tool:` parameter
continues to work for backward compatibility.
2026-03-23 00:43:59 +09:00
..
mcp Allow Client#call_tool to accept a tool name 2026-03-23 00:43:59 +09:00
json_rpc_handler.rb Add logging support 2026-01-26 22:23:46 +09:00
mcp.rb Use autoload to defer loading of unused subsystems 2026-03-12 14:08:27 +09:00