active_mcp 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/active_mcp/base_controller.rb +1 -0
- data/app/controllers/concerns/active_mcp/request_handlable.rb +2 -2
- data/app/controllers/concerns/active_mcp/resource_readable.rb +1 -1
- data/app/{models/active_mcp/tool_executor.rb → controllers/concerns/active_mcp/tool_executable.rb} +7 -3
- data/lib/active_mcp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6663bc950db47a5719e93db048f5601acb9dd58b87421fe0eb94e2c78cec2333
|
4
|
+
data.tar.gz: ffacf7506cc82ad8fc680dd57f3f74ee50875e8bb7053ff460dc28e59c232cfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6631c864d9b2fbf566f5202eb31c16a4cb0154a0bcac33b23165c365adab03a01b7ee54da8996dd87660c78046457d2baa6c23f1e1e4dd5a57ea6c06601d84ca
|
7
|
+
data.tar.gz: b3f85f31d012218cafba456a4ebe9b50de9261686aec9b40d1f48a783e74bf6dba9506e113fb0d4372f8e5f82b6000911ec40016151063759d1b2865b68c7abe
|
@@ -48,7 +48,7 @@ module ActiveMcp
|
|
48
48
|
@format = :jsonrpc
|
49
49
|
render 'active_mcp/tools_list', formats: :json
|
50
50
|
when Method::TOOLS_CALL
|
51
|
-
@tool_result =
|
51
|
+
@tool_result = execute_tool(params: params, auth_info: auth_info)
|
52
52
|
@format = :jsonrpc
|
53
53
|
render 'active_mcp/tools_call', formats: :json
|
54
54
|
else
|
@@ -74,7 +74,7 @@ module ActiveMcp
|
|
74
74
|
@format = :json
|
75
75
|
render 'active_mcp/tools_list', formats: :json
|
76
76
|
when Method::TOOLS_CALL
|
77
|
-
@tool_result =
|
77
|
+
@tool_result = execute_tool(params: params, auth_info: auth_info)
|
78
78
|
@format = :json
|
79
79
|
render 'active_mcp/tools_call', formats: :json
|
80
80
|
else
|
data/app/{models/active_mcp/tool_executor.rb → controllers/concerns/active_mcp/tool_executable.rb}
RENAMED
@@ -1,6 +1,10 @@
|
|
1
1
|
module ActiveMcp
|
2
|
-
|
3
|
-
|
2
|
+
module ToolExecutable
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
private
|
6
|
+
|
7
|
+
def execute_tool(params:, auth_info:)
|
4
8
|
if params[:jsonrpc].present?
|
5
9
|
tool_name = params[:params][:name]
|
6
10
|
tool_params = params[:params][:arguments]
|
@@ -105,7 +109,7 @@ module ActiveMcp
|
|
105
109
|
end
|
106
110
|
end
|
107
111
|
|
108
|
-
def
|
112
|
+
def formatted(object)
|
109
113
|
case object
|
110
114
|
when String
|
111
115
|
object
|
data/lib/active_mcp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_mcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moeki Kawakami
|
@@ -70,7 +70,7 @@ files:
|
|
70
70
|
- app/controllers/active_mcp/base_controller.rb
|
71
71
|
- app/controllers/concerns/active_mcp/request_handlable.rb
|
72
72
|
- app/controllers/concerns/active_mcp/resource_readable.rb
|
73
|
-
- app/
|
73
|
+
- app/controllers/concerns/active_mcp/tool_executable.rb
|
74
74
|
- app/views/active_mcp/cancelled.json.jbuilder
|
75
75
|
- app/views/active_mcp/initialize.json.jbuilder
|
76
76
|
- app/views/active_mcp/initialized.json.jbuilder
|