16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
# File 'lib/open_gemdocs/mcp/tools.rb', line 16
def list
[
{
"name" => "search_gems",
"description" => "Search for installed Ruby gems",
"inputSchema" => {
"type" => "object",
"properties" => {
"query" => {
"type" => "string",
"description" => "Search query for gem names (partial match supported)"
}
},
"required" => ["query"]
}
},
{
"name" => "get_gem_info",
"description" => "Get information about a specific gem including version and summary",
"inputSchema" => {
"type" => "object",
"properties" => {
"gem_name" => {
"type" => "string",
"description" => "Exact name of the gem"
}
},
"required" => ["gem_name"]
}
},
{
"name" => "start_yard_server",
"description" => "Start the Yard documentation server",
"inputSchema" => {
"type" => "object",
"properties" => {}
}
},
{
"name" => "stop_yard_server",
"description" => "Stop the Yard documentation server",
"inputSchema" => {
"type" => "object",
"properties" => {}
}
},
{
"name" => "get_yard_server_status",
"description" => "Check if the Yard documentation server is running",
"inputSchema" => {
"type" => "object",
"properties" => {}
}
},
{
"name" => "get_gem_documentation_url",
"description" => "Get the local documentation URL for a gem (Note: Use fetch_gem_docs instead to get actual documentation content)",
"inputSchema" => {
"type" => "object",
"properties" => {
"gem_name" => {
"type" => "string",
"description" => "Name of the gem"
},
"class_name" => {
"type" => "string",
"description" => "Optional: specific class or module name"
}
},
"required" => ["gem_name"]
}
},
{
"name" => "fetch_gem_docs",
"description" => "Fetch structured documentation content for a gem or specific class/module. Returns formatted documentation with methods, attributes, parameters, and examples. Use this instead of fetching URLs directly.",
"inputSchema" => {
"type" => "object",
"properties" => {
"gem_name" => {
"type" => "string",
"description" => "Name of the gem"
},
"path" => {
"type" => "string",
"description" => 'Optional: specific class or module path (e.g., "FactoryBot::Trait" or "ActiveRecord::Base")'
}
},
"required" => ["gem_name"]
}
}
]
end
|