Class: KairosMcp::Tools::HelloWorld

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/kairos_mcp/tools/hello_world.rb

Instance Method Summary collapse

Methods inherited from BaseTool

#initialize, #invoke_tool, #to_full_schema, #to_schema

Constructor Details

This class inherits a constructor from KairosMcp::Tools::BaseTool

Instance Method Details

#call(arguments) ⇒ Object



51
52
53
54
# File 'lib/kairos_mcp/tools/hello_world.rb', line 51

def call(arguments)
  name = arguments['name'] || 'World'
  text_content("Hello, #{name}! This is KairosChain MCP Server.")
end

#categoryObject



14
15
16
# File 'lib/kairos_mcp/tools/hello_world.rb', line 14

def category
  :guide
end

#descriptionObject



10
11
12
# File 'lib/kairos_mcp/tools/hello_world.rb', line 10

def description
  'Returns a hello message from KairosChain MCP Server'
end

#examplesObject



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/kairos_mcp/tools/hello_world.rb', line 22

def examples
  [
    {
      title: 'Simple greeting',
      code: 'hello_world()'
    },
    {
      title: 'Personalized greeting',
      code: 'hello_world(name: "Kairos")'
    }
  ]
end

#input_schemaObject



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/kairos_mcp/tools/hello_world.rb', line 39

def input_schema
  {
    type: 'object',
    properties: {
      name: {
        type: 'string',
        description: 'Name to greet (optional)'
      }
    }
  }
end

#nameObject



6
7
8
# File 'lib/kairos_mcp/tools/hello_world.rb', line 6

def name
  'hello_world'
end


35
36
37
# File 'lib/kairos_mcp/tools/hello_world.rb', line 35

def related_tools
  %w[tool_guide chain_status]
end

#usecase_tagsObject



18
19
20
# File 'lib/kairos_mcp/tools/hello_world.rb', line 18

def usecase_tags
  %w[hello test greeting verify connection]
end