Module: CompletionKit::McpTools::Responses
- Extended by:
- Base
- Defined in:
- app/services/completion_kit/mcp_tools/responses.rb
Constant Summary
collapse
- TOOLS =
{
"responses_list" => {
description: "List responses for a run",
inputSchema: {type: "object", properties: {run_id: {type: "integer"}}, required: ["run_id"]},
handler: :list
},
"responses_get" => {
description: "Get a specific response",
inputSchema: {
type: "object",
properties: {run_id: {type: "integer"}, id: {type: "integer"}},
required: ["run_id", "id"]
},
handler: :get
}
}.freeze
Class Method Summary
collapse
Methods included from Base
call, definitions, error_result, text_result
Class Method Details
.get(args) ⇒ Object
28
29
30
31
|
# File 'app/services/completion_kit/mcp_tools/responses.rb', line 28
def self.get(args)
run = Run.find(args["run_id"])
text_result(run.responses.find(args["id"]).as_json)
end
|
.list(args) ⇒ Object
23
24
25
26
|
# File 'app/services/completion_kit/mcp_tools/responses.rb', line 23
def self.list(args)
run = Run.find(args["run_id"])
text_result(run.responses.includes(:reviews).map(&:as_json))
end
|