Class: KairosMcp::Tools::SkillsGet
Instance Method Summary
collapse
Methods inherited from BaseTool
#initialize, #invoke_tool, #to_full_schema, #to_schema
Instance Method Details
#call(arguments) ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 49
def call(arguments)
section_id = arguments['section_id']
unless section_id && !section_id.empty?
return text_content("Error: section_id is required")
end
parser = SkillsParser.new
section = parser.get_section(section_id.upcase)
if section.nil?
available = parser.list_sections.map { |s| s[:id] }.join(', ')
return text_content("Section '#{section_id}' not found.\n\nAvailable sections: #{available}")
end
output = "## [#{section.id}] #{section.title}\n\n"
output += section.content
text_content(output)
end
|
#category ⇒ Object
15
16
17
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 15
def category
:skills
end
|
#description ⇒ Object
11
12
13
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 11
def description
'Get the content of a specific KairosChain skills section by ID (Markdown).'
end
|
#examples ⇒ Object
23
24
25
26
27
28
29
30
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 23
def examples
[
{
title: 'Get skill section',
code: 'skills_get(section_id: "PHILOSOPHY-010")'
}
]
end
|
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 36
def input_schema
{
type: 'object',
properties: {
section_id: {
type: 'string',
description: 'The section ID to retrieve (e.g., "ARCH-010")'
}
},
required: ['section_id']
}
end
|
#name ⇒ Object
7
8
9
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 7
def name
'skills_get'
end
|
32
33
34
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 32
def related_tools
%w[skills_list skills_dsl_get resource_read]
end
|
19
20
21
|
# File 'lib/kairos_mcp/tools/skills_get.rb', line 19
def usecase_tags
%w[get read L0 markdown skill section content]
end
|