Skip to content

feat(core): add firecrawl devsearch tool - #49176

Open
erikengervall wants to merge 1 commit into
anomalyco:v2from
erikengervall:firecrawl-devsearch
Open

erikengervall wants to merge 1 commit into
anomalyco:v2from
erikengervall:firecrawl-devsearch

Conversation

@erikengervall

Copy link
Copy Markdown
Contributor

Issue for this PR

None. Follow-up to #41042 (Firecrawl web search provider). Replaces #46534, which added the developer index as a second web search provider; review feedback asked for a separate, connection-gated tool instead.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a devsearch tool backed by Firecrawl's firecrawl_developer_search MCP tool. It searches an index built for coding agents (repositories, GitHub issues, merged pull requests, READMEs, curated documentation) and returns the matched passages, so the model gets the relevant docs excerpt or issue thread rather than a page summary.

Shape, per the feedback on #46534:

  • Separate tool, not a web search provider. It does not replace websearch and takes no part in provider selection or the random pool.
  • Connection gated. The tool is registered, but the session context, compaction and generate hooks drop it until the Firecrawl integration has an active connection (a saved key via /connect, or FIRECRAWL_API_KEY). If a stale tool list still calls it, it fails with a clear "connect Firecrawl" message instead of sending a keyless request.
  • Shares the Firecrawl request code. Credential resolution, headers and the MCP call move into WebSearchFirecrawl.call, which both the web search provider and the new tool use.

The rest wires devsearch through the same surfaces websearch uses: session-ui renderer and error label, TUI inline display and permission title, ACP permission title, the permission.devsearch config key, the Explore agent allow rule, and the tools and permissions docs.

How did you verify your code works?

  • bun run typecheck in packages/core (including tests), packages/tui, packages/session-ui, packages/ui, packages/cli
  • bun run test test/tool-devsearch.test.ts test/tool-websearch.test.ts test/plugin/websearch.test.ts test/tool-webfetch.test.ts test/location-layer.test.ts in packages/core
  • bun test for the TUI permission and tool-display tests and the session-ui unit tests
  • bun run lint, plus Prettier on the changed files
  • Checked the Firecrawl MCP server source: firecrawl_developer_search is registered on the authenticated /v2/mcp surface and only hidden from keyless sessions, so the gated tool reaches it through the same endpoint the provider already uses

Screenshots / recordings

No UI change beyond the new "Developer Search" tool row in the TUI and session UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

🤖 Generated with Claude Code

Adds a connection-gated `devsearch` tool backed by Firecrawl's
`firecrawl_developer_search` MCP tool. It searches an index of
repositories, GitHub issues, merged pull requests, READMEs, and curated
documentation and returns the matched passages.

It is a separate tool rather than a web search provider, so it never
replaces `websearch` or joins the provider pool. Sessions only see it
once the Firecrawl integration has an active connection (saved key or
FIRECRAWL_API_KEY). The Firecrawl MCP request code is shared with the
existing web search provider through `WebSearchFirecrawl.call`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant