active_mcp 0.10.1 → 0.10.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52bc4e16d14575dbf11222fbdcbd59282551f3c6ead55fb8bd16be7d98ab45c0
|
4
|
+
data.tar.gz: 653b86697f28c509738527af695080c2976e9bef9184fa3b4b5761ff1ec0d3c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d74b26b70a1f3eb5c17c487078d93e94ba1e53080de4a8a12d09f3b9195bc5f60bba406e357d5a093c7d07a0882da2f9cf8ba57be7f87e9b4568b49081a2042b
|
7
|
+
data.tar.gz: cafb6a68accab2b5e0a080121580634c3bac4c0993d6ecd56fe0e052e85800ba9c96fc3391cfde5160ee948bdec867213dc9bcd9e6fce3958013941a89d362ce
|
@@ -6,7 +6,7 @@ json.result do
|
|
6
6
|
json.array!(@prompts) do |prompt|
|
7
7
|
json.name prompt.prompt_name
|
8
8
|
json.description prompt.description
|
9
|
-
json.arguments prompt.class.arguments.map { _1.except(:complete) }
|
9
|
+
json.arguments prompt.class.arguments ? prompt.class.arguments.map { _1.except(:complete) } : []
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -11,8 +11,8 @@ module ActiveMcp
|
|
11
11
|
values = resource_class.arguments[arg_name.to_sym].call(value)
|
12
12
|
{values:, total: values.length}
|
13
13
|
elsif ref_name
|
14
|
-
|
15
|
-
values =
|
14
|
+
prompt = refs.find { _1.prompt_name == ref_name }
|
15
|
+
values = prompt.class.arguments.find { _1[:name] == arg_name.to_sym }[:complete].call(value)
|
16
16
|
{values:, total: values.length}
|
17
17
|
end
|
18
18
|
end
|
@@ -62,7 +62,7 @@ module ActiveMcp
|
|
62
62
|
error_response(request[:id], ErrorCode::METHOD_NOT_FOUND, "Unknown method: #{request[:method]}")
|
63
63
|
end
|
64
64
|
rescue => e
|
65
|
-
Server.log_error("Error #{
|
65
|
+
Server.log_error("Error #{request[:method]}", e)
|
66
66
|
error_response(request[:id], ErrorCode::INTERNAL_ERROR, "An error occurred")
|
67
67
|
end
|
68
68
|
|
data/lib/active_mcp/version.rb
CHANGED