active_mcp 0.3.7 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b1ac7584f7ddf7e6177d76ab7ad3c237cfff567edad23a97373e9786c9990b1
4
- data.tar.gz: '082cc9a913f972beea70f82d3a7fca3dd88c33ff2635025e305bd8a24338024b'
3
+ metadata.gz: 7590ef8e26a79bcfdf5ba7799364e23fa15db4df88e119c40031e8175325adef
4
+ data.tar.gz: 7497ed180ae7103c44edaf9c9790af5b45a25472c488a71cf3e08a22ad4943a1
5
5
  SHA512:
6
- metadata.gz: 67bf6809b4a86e214e2ba74430615b57c55e15b5f253eaf12a406fc8ac6810d79e024d00b0a3d6f74e2ed731fe7782111d78e2c3a47bfc98334d6180c13bed49
7
- data.tar.gz: cc1e62b097338a294437060ce9a792ea141c7dabb919e97471053b436296cd152bc34b436fdcd6e8e61f897ada9cfb49eaec219f6c447f261b3bf11a3ca291f4
6
+ metadata.gz: ee465bd60b524719a42c5d844903f1a6e7778fabe8d0c3e7c60bacdcd76cff591fc5a16f3fb44eda79053d91a496356b42272bbb0218cc66cb15f4e228911fde
7
+ data.tar.gz: 36d4828b0a41976fd9a2b48bafc17326e888e824b5a3c1df84178cb601fdb8ababf4348a0fe0f347b499ad221bf3454428e39390f77785e7c5f2607915a0f879
@@ -49,18 +49,22 @@ module ActiveMcp
49
49
  }
50
50
  end
51
51
 
52
- if tool_params
53
- arguments = tool_params.permit!.to_hash.symbolize_keys.transform_values do |value|
54
- if !value.is_a?(String)
55
- value
56
- else
57
- value.match(/^\d+$/) ? value.to_i : value
58
- end
59
- end
52
+ if tool_params.is_a?(String)
53
+ arguments = JSON.parse(tool_params).symbolize_keys
54
+ elsif tool_params
55
+ arguments = tool_params.permit!.to_hash.symbolize_keys
60
56
  else
61
57
  arguments = {}
62
58
  end
63
59
 
60
+ arguments = arguments.transform_values do |value|
61
+ if !value.is_a?(String)
62
+ value
63
+ else
64
+ value.match(/^\d+$/) ? value.to_i : value
65
+ end
66
+ end
67
+
64
68
  tool = tool_class.new
65
69
  validation_result = tool.validate_arguments(arguments)
66
70
 
@@ -84,7 +88,7 @@ module ActiveMcp
84
88
  content: [
85
89
  {
86
90
  type: "text",
87
- text: formatted(tool.call(**arguments.symbolize_keys, auth_info:))
91
+ text: formatted(tool.call(**arguments.symbolize_keys))
88
92
  }
89
93
  ]
90
94
  }
@@ -1,3 +1,3 @@
1
1
  module ActiveMcp
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
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.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moeki Kawakami