rails_mcp_engine 0.4.1 → 0.4.2
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/lib/tool_schema/ruby_llm_factory.rb +5 -0
- data/lib/rails_mcp_engine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fc2df9d33f43a23bac0d1474e3504d761a3040af9e2fd21798e9fabcbeb5234
|
|
4
|
+
data.tar.gz: 29ccf61986dd70e34b099290b39fc95c1f66270f7362c56a42aee7d673e96258
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 639659931f065cb9e49be2344666e6e30fbe58531b5ddbbe588fcab195f41be86e3efbda5ce6e0385cf7f57c78b26a7d2feed8ce46dc6c73ae894ebe2e346c65
|
|
7
|
+
data.tar.gz: b34d737dbf1ec61083e1146d57991eaa2215a02999457da56f825366fb97030ff8eed9d8be81b3f88f4d40004c2f6dc9e4a799150c9fa5ee8ff2f77c90ac96a7
|
|
@@ -21,10 +21,15 @@ module ToolSchema
|
|
|
21
21
|
parent = Tools
|
|
22
22
|
parent.send(:remove_const, tool_constant) if parent.const_defined?(tool_constant, false)
|
|
23
23
|
|
|
24
|
+
tool_name = T.let(schema[:name], String)
|
|
24
25
|
klass = Class.new(RubyLLM::Tool) do
|
|
25
26
|
description(schema[:description])
|
|
26
27
|
params(&RubyLlmBuilder.params_block(schema[:params]))
|
|
27
28
|
|
|
29
|
+
# Override RubyLLM::Tool#name to use the tool_name from ToolMeta
|
|
30
|
+
# instead of the auto-generated name from the Ruby class name.
|
|
31
|
+
define_method(:name) { tool_name }
|
|
32
|
+
|
|
28
33
|
define_method(:execute) do |**kwargs|
|
|
29
34
|
before_call&.call(kwargs)
|
|
30
35
|
result = service_class.new.public_send(schema[:entrypoint], **kwargs)
|