ask-web-search-mcp 0.4.7 → 0.5.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +14 -0
- data/lib/ask/web_search/mcp/tool.rb +14 -3
- data/lib/ask/web_search/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: 22012e3dfc536bd9c8f1343c3399aa807fc61206013ad9711259e03cea50c004
|
|
4
|
+
data.tar.gz: f1fb488b62b0d625a05af8683522dd2aaac1fbeab0a52c76488ebcd2f4010d07
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03ff7937c8a775ead2a70d7cd3985b782588be41ef183df847b4899692c67886a2e883cee967cf56fe52ac8ddcfac65f4188d556a5cd28d99423aaae41b414d3
|
|
7
|
+
data.tar.gz: a677efef42fc728fdf1e4951d76a8738ca4076d5062a8f6474619396ab7422f6bed0fadf59cd8bc61da43da1932ee360d105b7f51ffb58315c6b3043be5f5c2e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.0] — 2026-09-19
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Optional `time_range` and `categories` parameters** on `ask_web_search`
|
|
8
|
+
— freshness window (`day` / `week` / `month` / `year`) and vertical
|
|
9
|
+
(`general` / `news` / `science`) — forwarded to the library. A bad value
|
|
10
|
+
surfaces as tool text (`Error: ArgumentError: invalid time_range ...
|
|
11
|
+
use one of: day, week, month, year`) so agents can self-correct.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Depends on `ask-web-search >= 0.6.0` (the library side of the same
|
|
16
|
+
feature; see its CHANGELOG for the freshness-window failure UX and the
|
|
17
|
+
SearXNG engine caveat).
|
|
18
|
+
|
|
3
19
|
## [0.4.5] — 2026-09-09
|
|
4
20
|
|
|
5
21
|
### Changed
|
data/README.md
CHANGED
|
@@ -88,6 +88,20 @@ claude mcp add ask-web-search-mcp -- npx -y @anthropic-ai/mcp-serve ask-web-sear
|
|
|
88
88
|
- `SEARXNG_URL` - the SearXNG endpoint (default: `http://localhost:8888`).
|
|
89
89
|
- `DEBUG=1` - enable verbose logs on stderr.
|
|
90
90
|
|
|
91
|
+
## Tool parameters
|
|
92
|
+
|
|
93
|
+
`ask_web_search` takes a required `query` plus two optional parameters,
|
|
94
|
+
forwarded to the library:
|
|
95
|
+
|
|
96
|
+
- `time_range` — freshness window: `day`, `week`, `month`, or `year`.
|
|
97
|
+
Use for recency-sensitive queries. A windowed search that comes back
|
|
98
|
+
cleanly empty reports the window ("No results found within the day
|
|
99
|
+
freshness window…") so the model can retry broader; see the
|
|
100
|
+
ask-web-search README for the current SearXNG engine caveat.
|
|
101
|
+
- `categories` — vertical: `general` (default), `news`, or `science`
|
|
102
|
+
(research papers). The SearXNG instance must have vertical engines
|
|
103
|
+
enabled — the `searxng/` compose config in the ask-rb repository does.
|
|
104
|
+
|
|
91
105
|
## Full documentation
|
|
92
106
|
|
|
93
107
|
The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs.
|
|
@@ -23,7 +23,17 @@ module Ask
|
|
|
23
23
|
{
|
|
24
24
|
"type" => "object",
|
|
25
25
|
"properties" => {
|
|
26
|
-
"query" => { "type" => "string", "description" => "The search query" }
|
|
26
|
+
"query" => { "type" => "string", "description" => "The search query" },
|
|
27
|
+
"time_range" => {
|
|
28
|
+
"type" => "string",
|
|
29
|
+
"enum" => Ask::WebSearch::TIME_RANGES,
|
|
30
|
+
"description" => "Freshness window: only results from the past day, week, month, or year. Use for recency-sensitive queries (news, prices, releases); omit otherwise."
|
|
31
|
+
},
|
|
32
|
+
"categories" => {
|
|
33
|
+
"type" => "string",
|
|
34
|
+
"enum" => %w[general news science],
|
|
35
|
+
"description" => "Vertical to search: general web results (default), news, or science (research papers). Use news for current events, science for papers."
|
|
36
|
+
}
|
|
27
37
|
},
|
|
28
38
|
"required" => ["query"]
|
|
29
39
|
}
|
|
@@ -32,12 +42,13 @@ module Ask
|
|
|
32
42
|
# Returns the formatted results (a String is a success for the
|
|
33
43
|
# adapter). On failure, returns a formatted error string so the
|
|
34
44
|
# agent gets the library's diagnostics instead of a generic
|
|
35
|
-
# transport error
|
|
45
|
+
# transport error — including the library's ArgumentError for a
|
|
46
|
+
# bad time_range, which tells the agent which values are valid.
|
|
36
47
|
def call(args)
|
|
37
48
|
query = args["query"].to_s
|
|
38
49
|
raise ArgumentError, "missing required parameter: query" if query.empty?
|
|
39
50
|
|
|
40
|
-
Ask::WebSearch.search(query)
|
|
51
|
+
Ask::WebSearch.search(query, time_range: args["time_range"], categories: args["categories"])
|
|
41
52
|
rescue StandardError => e
|
|
42
53
|
"Error: #{e.class.name}: #{e.message}"
|
|
43
54
|
end
|
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.
|
|
4
|
+
version: 0.5.0
|
|
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.
|
|
32
|
+
version: 0.6.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.
|
|
39
|
+
version: 0.6.0
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: minitest
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|