Module: Riffer::Mcp::ToolFactory
Overview
Generates anonymous Riffer::Tool subclasses from MCP tool definitions. Generated tools delegate #call to the MCP client and skip Riffer’s param validation — the MCP server validates inputs.
Instance Method Summary collapse
-
#build(manifest_name, client, tool_defs) ⇒ Object
Builds one Riffer::Tool subclass per tool definition, prefixing names with the manifest name to avoid cross-server collisions (e.g.
jira__search); the server-side name stays on.mcp_server_tool_name.
Instance Method Details
#build(manifest_name, client, tool_defs) ⇒ Object
Builds one Riffer::Tool subclass per tool definition, prefixing names with the manifest name to avoid cross-server collisions (e.g. jira__search); the server-side name stays on .mcp_server_tool_name. – : (String, Riffer::Mcp::Client, Array[Hash[Symbol, untyped]]) -> Array
15 16 17 |
# File 'lib/riffer/mcp/tool_factory.rb', line 15 def build(manifest_name, client, tool_defs) tool_defs.map { |td| build_tool_class(manifest_name, client, td) } end |