ask-web-fetch-mcp 0.6.9 → 0.7.0

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: 787cebecb3415f847bcd4cd1f40d6cde7c8f56e86ecb4927648608cb4ef1eb5b
4
- data.tar.gz: 7a398426c5c84fe46b0747f6ca43e23b36d2f95ff15dacf96a0d52bb5f6458db
3
+ metadata.gz: c93ebb268775dc96095fee1f9843e8dadabd8a8ecf5b4945d29d35ad4ef2479e
4
+ data.tar.gz: 8e2952f51b68d0274b1a9b6cdbe54cb4355bfe401c15116d630d7cf5d73e47e9
5
5
  SHA512:
6
- metadata.gz: d353a31322e70c3dcc6e6131482ba0d21eb47d2933f180eb57032d2aca2ec9c0d935e47e057abfe6f771879b8c114ec821d23394d9c90bdd2c26da095a520820
7
- data.tar.gz: bc7d1b64dcca473d38e71414bd10d19a13854b04b7fe4f3597c6d74cc17263561e6ff64ee5a9c51170c3c1b2fbd422e5e4a1c7f61efb66019a15ea20a2168d09
6
+ metadata.gz: aa93bb7fcc44565dcd2916dce258c8af427d4f1d5868b8d19bcaf5e3dc2a53f5b038b925b65ce017ae9faca391bbecc70885d9b056542a8d738eea12673fbe4b
7
+ data.tar.gz: 50ad953f99c9e4611dec53e821188d3bfd2eff785444cc90dbbed536372e8486b3df1afa9a678fe080e5c6abf90093035b50f89e7e03a75e4b7804f613878688
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) or raises. The terminal verdicts — ParkedDomainError,
36
- # EmptyContentError, FetchError — reach the client as their class,
37
- # so it never retries the unretryable; transient failures raise
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
@@ -3,7 +3,7 @@
3
3
  module Ask
4
4
  module WebFetch
5
5
  module MCP
6
- VERSION = '0.6.9'
6
+ VERSION = '0.7.0'
7
7
  end
8
8
  end
9
9
  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.6.9
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto