Class: KairosMcp::Tools::SkillsDslList
- Inherits:
-
BaseTool
- Object
- BaseTool
- KairosMcp::Tools::SkillsDslList
show all
- Defined in:
- lib/kairos_mcp/tools/skills_dsl_list.rb
Instance Method Summary
collapse
Methods inherited from BaseTool
#initialize, #invoke_tool, #to_full_schema, #to_schema
Instance Method Details
#call(arguments) ⇒ Object
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 52
def call(arguments)
provider = DslSkillsProvider.new
search_query = arguments['search']
skills = if search_query && !search_query.empty?
provider.search_skills(search_query).map do |skill|
{ id: skill.id, title: skill.title, use_when: skill.use_when }
end
else
provider.list_skills
end
if skills.empty?
return text_content("No DSL skills found.#{search_query ? " (search: #{search_query})" : ''}")
end
output = "Available KairosChain DSL Skills:\n\n"
if search_query && !search_query.empty?
vs_status = provider.vector_search_status
search_method = vs_status[:semantic_available] ? 'semantic (RAG)' : 'keyword'
output += "_Search: \"#{search_query}\" | Method: #{search_method}_\n\n"
end
output += "| ID | Title | Use When |\n"
output += "|-----|-------|----------|\n"
skills.each do |skill|
use_when = skill[:use_when] || '-'
output += "| #{skill[:id]} | #{skill[:title]} | #{use_when} |\n"
end
output += "\nUse `skills_dsl_get` with a skill ID to retrieve full content."
text_content(output)
end
|
#category ⇒ Object
15
16
17
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 15
def category
:skills
end
|
#description ⇒ Object
11
12
13
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 11
def description
'List all available KairosChain skills defined in Ruby DSL. Returns ID, title, and usage hints. Supports optional search query.'
end
|
#examples ⇒ Object
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 23
def examples
[
{
title: 'List all DSL skills',
code: 'skills_dsl_list()'
},
{
title: 'Search DSL skills',
code: 'skills_dsl_list(search: "safety")'
}
]
end
|
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 40
def input_schema
{
type: 'object',
properties: {
search: {
type: 'string',
description: 'Optional search query to filter results (uses semantic search if available)'
}
}
}
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 7
def name
'skills_dsl_list'
end
|
36
37
38
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 36
def related_tools
%w[skills_dsl_get skills_evolve skills_list]
end
|
19
20
21
|
# File 'lib/kairos_mcp/tools/skills_dsl_list.rb', line 19
def usecase_tags
%w[list search L0 DSL skills browse discover]
end
|