Skip to content

feat: Serve apify/web-search as a run-based Actor tool - #1654

Merged
jirispilka merged 6 commits into
refactor/self-contained-web-descriptionsfrom
feat/web-search-run-tool
Oct 21, 2026
Merged

jirispilka merged 6 commits into
refactor/self-contained-web-descriptionsfrom
feat/web-search-run-tool

Conversation

@jirispilka

@jirispilka jirispilka commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1651. Stack: #1669 → this PR → #1655.

Web Search's standby MCP interface bypasses the run-based tool contract used by Web Fetch.

Web Search is still opt-in. The default Actors remain apify/rag-web-browser and apify/web-fetch

Contract change: apify--web-search--search is replaced by apify--web-search; call-actor rejects apify/web-search:search, and Actor details no longer list its MCP tools. The default Actor selection stays the same. Web Fetch also stays on the input interface when its Actor re-enables /mcp, preserving its existing tool contract.

Evals test cases

Web Search, RAG Web Browser and Web Fetch compared: which tool to use when, from 3 rounds of real runs and 90 Haiku routing probes. Web Search then Web Fetch and RAG Web Browser rated about even on page quality; Web Search failed 4 of 28 runs after about 57 s (one Google request with a 55 s timeout, no retry).

Notes for reviewers (human-written)

Proof it works

Final-stack Haiku 4.5 selection eval: 18/18. All five checks pass; 3,282 unit tests pass, one skipped.

Regression tests cover Web Fetch tool loading and call-actor routing with standby and /mcp enabled.

AI assistance: Claude Code (original implementation and mcpc probes); Codex (simplification, stacking, tests, evals, and PR text).

apify/web-search has standby on and declares webServerMcpPath, so it was
served through its MCP server as apify--web-search--search. Serve it like
apify/web-fetch instead: a run per call through its input schema.

- INPUT_INTERFACE_ACTORS (web-search only) makes resolveActorToolMode
  return RUN before the MCP-path row; tool loading and call-actor routing
  share the rule.
- Web Search description; web-fetch and rag-web-browser are named in it
  only when served. The RAG and Web Fetch descriptions, the search-actors
  description and the server instructions name apify/web-search only when
  it is served.

Closes #1651

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jpt2znRzh6CQU7xKWLUosJ
@apify-service-account apify-service-account linked an issue Oct 20, 2026 that may be closed by this pull request
Correct the RAG web-search hint JSDoc, drop a JSDoc sentence that restated
the parameter name, and restore the connectMCPClient spy in afterEach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jpt2znRzh6CQU7xKWLUosJ
@jirispilka
jirispilka marked this pull request as ready for review October 20, 2026 01:54
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 20, 2026
@apify-service-account apify-service-account added the t-ai Issues owned by the AI team. label Oct 20, 2026
The sentence sent "news, articles" requests to apify/web-search, which the
web-search evals show models over-routing to. search-actors keeps master's
text: it names apify/rag-web-browser when that tool is served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jpt2znRzh6CQU7xKWLUosJ
jirispilka pushed a commit that referenced this pull request Oct 20, 2026
The new and edited web-search cases in mcp-server-evals-pr and
mcp-server-evals-merge broke master and other PRs, which serve
apify/web-search under its MCP tool name until #1654 merges. Those items are
back to their earlier state (the 10 new ones archived), and the 32 cases
live in mcp-server-evals-{pr,merge}-web-search-staging under
stage-web-search/ ids until #1653 promotes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jpt2znRzh6CQU7xKWLUosJ
@jirispilka
jirispilka added this pull request to stack #1667 October 21, 2026 06:29
@jirispilka
jirispilka marked this pull request as draft October 21, 2026 06:55
@jirispilka
jirispilka removed this pull request from stack #1667 October 21, 2026 07:39
@jirispilka
jirispilka changed the base branch from master to refactor/self-contained-web-descriptions October 21, 2026 07:39
@jirispilka
jirispilka added this pull request to stack #1670 October 21, 2026 07:39
@jirispilka
jirispilka marked this pull request as ready for review October 21, 2026 09:32
@jirispilka
jirispilka merged commit 09fab11 into master Oct 21, 2026
29 of 30 checks passed
@jirispilka
jirispilka deleted the feat/web-search-run-tool branch October 21, 2026 21:18
jirispilka added a commit that referenced this pull request Oct 21, 2026
All the tools descriptions looks like a spaghetti so I evaluated it and
removed the references between them and it works ok.

Each web tool already describes its output; naming siblings adds
conditional text. First in the stack, before #1654 and #1655; overlaps
#1658.

Remove named web-tool referrals and comparison bullets. Keep each
Actor's standalone description. This changes default-session and
server-card text.

## Proof it works

Haiku 4.5, first-tool selection:
- Current defaults:
[12/13](https://langfuse.apify.dev/project/cmshkde21000krg07shb46d8g/datasets/cmtt5babm00xmtm07zwlp3t22/runs/1f331deb316d8d44).
The miss chose native WebSearch for today's weather.
- With #1654: 18/18
[before](https://langfuse.apify.dev/project/cmshkde21000krg07shb46d8g/datasets/cmvgxtk4l0084th07gxuce3ym/runs/3290235eeff97d83)
and on the [final
stack](https://langfuse.apify.dev/project/cmshkde21000krg07shb46d8g/datasets/cmvgxtk4l0084th07gxuce3ym/runs/b95c6bf28a728e5c).
- Extra probes: 6/6 before, 5/6 after; one full-text request started
with Web Search instead of RAG. Task completion was not tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Serve apify/web-search as a run-based Actor tool feat: Make apify/web-search a default MCP tool

5 participants