Class: McpStdioRuby::GreetTool

Inherits:
MCP::Tool
  • Object
show all
Defined in:
lib/mcp_stdio_ruby/greet_tool.rb

Overview

Define the greet tool

Class Method Summary collapse

Class Method Details

.call(name:) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/mcp_stdio_ruby/greet_tool.rb', line 23

def call(name:)
  AppLogger.logger.info "GreetTool called with name: #{name}"
  MCP::Tool::Response.new(
    [
      {
        type: 'text',
        text: "Hello, #{name}!"
      }
    ]
  )
end