Class: RailsVitals::MCP::Tools::Base
- Inherits:
-
Object
- Object
- RailsVitals::MCP::Tools::Base
- Defined in:
- lib/rails_vitals/mcp/tools/base.rb
Direct Known Subclasses
Class Method Summary collapse
- .definition ⇒ Object
-
.tool_name ⇒ Object
Subclasses must define: TOOL_NAME = “railsvitals_example” DESCRIPTION = “What this tool does for the AI model” INPUT_SCHEMA = { type: “object”, properties: {} }.
Instance Method Summary collapse
Class Method Details
.definition ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rails_vitals/mcp/tools/base.rb', line 17 def self.definition { name: self::TOOL_NAME, description: self::DESCRIPTION, inputSchema: self::INPUT_SCHEMA } end |
.tool_name ⇒ Object
Subclasses must define:
TOOL_NAME = "railsvitals_example"
DESCRIPTION = "What this tool does for the AI model"
INPUT_SCHEMA = { type: "object", properties: {} }
And implement:
def call(params) → Hash
13 14 15 |
# File 'lib/rails_vitals/mcp/tools/base.rb', line 13 def self.tool_name self::TOOL_NAME end |
Instance Method Details
#call(params) ⇒ Object
25 26 27 |
# File 'lib/rails_vitals/mcp/tools/base.rb', line 25 def call(params) raise NotImplementedError, "#{self.class}#call is not implemented" end |