ask-web-search-mcp 0.3.1 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51082bc819e6a1339ee7ff5910271207bfe64d14b04491cf4b3d07e7c51bd1f9
4
- data.tar.gz: 58506846d0d4699a95bd2e9cb499a4cf2b5a18b662bd1fc16b07eecf71e02d5f
3
+ metadata.gz: 44df9d0adf47fe786877cd4274b601495ed4c8a8bd321bf52ba8bb46ff2dbb20
4
+ data.tar.gz: 9f8931e624de52daca3adcc55b781ff3625a4619c21e3e12665bbeb7202bdbdc
5
5
  SHA512:
6
- metadata.gz: 7efeb497e046762da0649d6eb498853892054d55a05a1dbf1631ba2e6c4f695d3303dc1afbaac94c0a65c4fdeefbbedb767ee4502984c058f6590ead2ad04a96
7
- data.tar.gz: 26a47fca4064effd03d08cbacd2e161f64d0ff5d0bc0d82fcc37ce6b95221a1f30ee2f2c1e058d8f1a867c7941a5034450f71967bdc7c428ba5fcdb619d5f284
6
+ metadata.gz: 3fca23e51d26d33b2aceddf431c7ec8d2ff50e419f12133e2da639db4aef09185be37ef0376d2b77200503e334bf779228c40c1e20a76b47e306dc5cd7fc9340
7
+ data.tar.gz: 975adedaac6d0c40087c4b61e8f4b15193a1215d6afece954aa9a4bbf998359313fa0f629b703ce1f2f73bf5ce13b184b5e3eb2b76044eee1a01f2ee82ec0400
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.0] - 2026-08-12
4
+
5
+ ### Changed
6
+
7
+ - **The server owns its tool shell.** `ask_web_search` is now a
8
+ duck-typed tool (`Ask::WebSearch::MCP::Tool` — `name` /
9
+ `description` / `params_schema` / `call`) wrapping the library entry
10
+ `Ask::WebSearch.search`, instead of a renamed `Ask::Tools::WebSearch`.
11
+ The MCP adapter's contract is duck-typed by design, so the ask-tools /
12
+ ask-core / ask-schema dependency chain is gone from the server
13
+ process entirely. `ask-web-search` floor raised to `>= 0.3.0` (the
14
+ module-level API). The native agent tool remains available in
15
+ ask-web-search as an optional integration for non-MCP consumers.
16
+
3
17
  ## [0.3.1] - 2026-08-04
4
18
 
5
19
  ### Fixed
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ask/web_search"
4
+
5
+ module Ask
6
+ module WebSearch
7
+ module MCP
8
+ # The ask_web_search tool, duck-typed for Ask::MCP's ToolServer
9
+ # adapter (name / description / params_schema / call). The tool
10
+ # framing lives with its consumer — this server — not in the
11
+ # library: the capability is Ask::WebSearch.search, this is the
12
+ # agent-facing shell around it.
13
+ class Tool
14
+ def name
15
+ "ask_web_search"
16
+ end
17
+
18
+ def description
19
+ "Search the web for current information. Use this to get up-to-date results, recent events, or facts that may have changed."
20
+ end
21
+
22
+ def params_schema
23
+ {
24
+ "type" => "object",
25
+ "properties" => {
26
+ "query" => { "type" => "string", "description" => "The search query" }
27
+ },
28
+ "required" => ["query"]
29
+ }
30
+ end
31
+
32
+ # Returns the formatted results (a String is a success for the
33
+ # adapter) or raises on connection/HTTP failures — the adapter
34
+ # surfaces them as classed errors.
35
+ def call(args)
36
+ query = args["query"].to_s
37
+ raise ArgumentError, "missing required parameter: query" if query.empty?
38
+
39
+ Ask::WebSearch.search(query)
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -3,7 +3,7 @@
3
3
  module Ask
4
4
  module WebSearch
5
5
  module MCP
6
- VERSION = "0.3.1"
6
+ VERSION = "0.4.1"
7
7
  end
8
8
  end
9
9
  end
@@ -2,18 +2,18 @@
2
2
 
3
3
  require "ask/mcp"
4
4
  require "ask/web_search"
5
+ require_relative "mcp/tool"
5
6
  require_relative "mcp/version"
6
7
 
7
8
  module Ask
8
9
  module WebSearch
9
10
  module MCP
10
- # Builds the tool exposed over MCP: Ask::Tools::WebSearch renamed to
11
- # "ask_web_search" to avoid collisions with client-side tools of the
12
- # same name.
11
+ # Builds the tool exposed over MCP. The tool framing lives here —
12
+ # ask-web-search is a library (Ask::WebSearch.search); this server
13
+ # owns the agent-facing shell, named "ask_web_search" to avoid
14
+ # collisions with client-side tools of the same name.
13
15
  def self.tool
14
- tool = Ask::Tools::WebSearch.new
15
- tool.define_singleton_method(:name) { "ask_web_search" }
16
- tool
16
+ Tool.new
17
17
  end
18
18
 
19
19
  # Start the MCP server over stdio, exposing the ask_web_search tool.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-web-search-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -15,28 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 0.4.3
18
+ version: 0.4.5
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: 0.4.3
25
+ version: 0.4.5
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: ask-web-search
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '0.2'
32
+ version: 0.3.0
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.2'
39
+ version: 0.3.0
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: minitest
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -66,10 +66,11 @@ dependencies:
66
66
  - !ruby/object:Gem::Version
67
67
  version: '13.0'
68
68
  description: |
69
- A minimal MCP (Model Context Protocol) server that exposes Ask::Tools::WebSearch
69
+ A minimal MCP (Model Context Protocol) server that exposes ask_web_search
70
70
  as a callable tool over stdio. Designed for use with clients that support MCP
71
71
  (ZCode, Claude Code, etc.), it queries a local SearXNG instance and returns
72
- formatted search results suitable for LLM consumption.
72
+ formatted search results suitable for LLM consumption. The tool shell (name,
73
+ schema, call) lives here, wrapping the Ask::WebSearch library.
73
74
  email:
74
75
  - kaka@myrrlabs.com
75
76
  executables:
@@ -83,6 +84,7 @@ files:
83
84
  - bin/ask-web-search-mcp
84
85
  - lib/ask-web-search-mcp.rb
85
86
  - lib/ask/web_search/mcp.rb
87
+ - lib/ask/web_search/mcp/tool.rb
86
88
  - lib/ask/web_search/mcp/version.rb
87
89
  homepage: https://github.com/ask-rb/ask-web-search-mcp
88
90
  licenses: