Class: KairosMcp::Tools::StateHistory
- Inherits:
-
BaseTool
- Object
- BaseTool
- KairosMcp::Tools::StateHistory
show all
- Defined in:
- lib/kairos_mcp/tools/state_history.rb
Overview
StateHistory: MCP tool to view state commit history
Shows past commits with their metadata and change summaries.
Instance Method Summary
collapse
Methods inherited from BaseTool
#initialize, #invoke_tool, #to_full_schema, #to_schema
Instance Method Details
#call(arguments) ⇒ Object
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 64
def call(arguments)
limit = arguments['limit'] || 10
hash = arguments['hash']
if hash
show_commit_details(hash)
else
show_history(limit)
end
end
|
#category ⇒ Object
22
23
24
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 22
def category
:state
end
|
#description ⇒ Object
18
19
20
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 18
def description
'View state commit history. Shows past snapshots with reasons and change summaries.'
end
|
#examples ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 30
def examples
[
{
title: 'View recent history',
code: 'state_history(limit: 10)'
},
{
title: 'View specific commit',
code: 'state_history(hash: "abc12345")'
}
]
end
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 47
def input_schema
{
type: 'object',
properties: {
limit: {
type: 'integer',
description: 'Maximum number of commits to show (default: 10)',
default: 10
},
hash: {
type: 'string',
description: 'Show details for a specific commit by hash (first 8 chars or full)'
}
}
}
end
|
#name ⇒ Object
14
15
16
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 14
def name
'state_history'
end
|
43
44
45
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 43
def related_tools
%w[state_status state_commit chain_history]
end
|
26
27
28
|
# File 'lib/kairos_mcp/tools/state_history.rb', line 26
def usecase_tags
%w[history snapshots commits audit trail past]
end
|