Class: Riffer::Mcp::Tool

Inherits:
Tool
  • Object
show all
Defined in:
lib/riffer/mcp/tool.rb

Overview

Base class for MCP-generated tools.

Constant Summary

Constants included from Tools::Toolable

Tools::Toolable::DEFAULT_TIMEOUT

Class Method Summary collapse

Methods inherited from Tool

#call, #call_with_validation, #error, #json, #text

Methods included from Tools::Toolable

all, #description, extended, #identifier, #kind, #name, #parameters_schema, #params, #timeout, #to_tool_schema, #validate_as_tool!

Class Method Details

.mcp_server_tool_nameObject

Returns the unprefixed tool name used for tools/call on the MCP server. – : () -> String



12
13
14
# File 'lib/riffer/mcp/tool.rb', line 12

def self.mcp_server_tool_name
  @mcp_server_tool_name || raise(NotImplementedError, "#{self} must set @mcp_server_tool_name")
end

.parameters_schema(strict: false) ⇒ Object

Returns the server-published input schema, falling back to the params DSL. MCP schemas are server-defined, so strict is not applied to them. – : (?strict: bool) -> Hash[Symbol, untyped]



20
21
22
# File 'lib/riffer/mcp/tool.rb', line 20

def self.parameters_schema(strict: false)
  @input_schema || super
end