ask-web-fetch-mcp 0.6.9 → 0.7.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/CHANGELOG.md +10 -0
- data/lib/ask/web_fetch/mcp/tool.rb +13 -4
- data/lib/ask/web_fetch/mcp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dfe482a2dfe7c33f713bdf1c058a7cb00cfb21c881292b9b2c0fb8a704ace312
|
|
4
|
+
data.tar.gz: 5a861a9a635164eda22cc3f47b2533e69c7d03ed9fb828b31a48d1f9d51278c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf0ae524bbedcba28edde8393cce6467820b12fab100c13e8e5aff6492dac06afa3745fd64bd120ce66e5a46dcddba7bddb9b40227674ae96cc222370ad1af73
|
|
7
|
+
data.tar.gz: 559ba85ee1e51751de567a41512974d4447940afc8ec2c251a1898594ca58d56000d6c2499a91bd1b0b22fb02ffc52601568bc69bff22dea24a6fea4f74e89e7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [0.7.0] — 2026-09-09
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
|
|
5
|
+
- **Errors are returned as formatted strings, not raised.** The MCP tool
|
|
6
|
+
now catches `Ask::WebFetch::Error` and returns a formatted error string
|
|
7
|
+
with class, message, and hint — so the agent gets our gem's diagnostics
|
|
8
|
+
instead of ZCode's generic "Request timed out" when the fetch takes
|
|
9
|
+
longer than the transport timeout.
|
|
10
|
+
|
|
1
11
|
## [0.6.8] — 2026-09-09
|
|
2
12
|
|
|
3
13
|
### Changed
|
|
@@ -32,10 +32,9 @@ module Ask
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# Returns the fetched markdown (a String is a success for the
|
|
35
|
-
# adapter)
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
# the base Error.
|
|
35
|
+
# adapter). On failure, returns a formatted error string with the
|
|
36
|
+
# error class, message, and hint — so the agent gets our gem's
|
|
37
|
+
# diagnostics instead of ZCode's generic timeout.
|
|
39
38
|
def call(args)
|
|
40
39
|
extra = args.keys.map(&:to_s) - params_schema['properties'].keys
|
|
41
40
|
unless extra.empty?
|
|
@@ -48,6 +47,16 @@ module Ask
|
|
|
48
47
|
|
|
49
48
|
max_chars = args['max_chars']
|
|
50
49
|
Ask::WebFetch.fetch(url, max_chars: max_chars || Ask::WebFetch::DEFAULT_MAX_CHARS)
|
|
50
|
+
rescue Ask::WebFetch::Error => e
|
|
51
|
+
format_error(e)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
private
|
|
55
|
+
|
|
56
|
+
def format_error(e)
|
|
57
|
+
parts = ["Error: #{e.class.name.split('::').last}: #{e.message}"]
|
|
58
|
+
parts << "Hint: #{e.hint}" if e.respond_to?(:hint) && e.hint
|
|
59
|
+
parts.join("\n")
|
|
51
60
|
end
|
|
52
61
|
end
|
|
53
62
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ask-web-fetch-mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaka Ruto
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 0.7.
|
|
32
|
+
version: 0.7.7
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 0.7.
|
|
39
|
+
version: 0.7.7
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: minitest
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|