Skip to content

fix: add missing lang and country params to search tool schema#179

Open
MaxwellCalkin wants to merge 1 commit intofirecrawl:mainfrom
MaxwellCalkin:fix/search-missing-lang-country-params
Open

fix: add missing lang and country params to search tool schema#179
MaxwellCalkin wants to merge 1 commit intofirecrawl:mainfrom
MaxwellCalkin:fix/search-missing-lang-country-params

Conversation

@MaxwellCalkin
Copy link
Copy Markdown

Summary

  • The firecrawl_search tool's description examples show lang and country parameters ("lang": "en", "country": "us"), but these were missing from the Zod schema
  • This causes Zod validation errors when LLMs follow the documented usage examples
  • Both parameters are defined in the Firecrawl JS SDK's SearchParams interface (lang?: string, country?: string) and are supported by the Firecrawl API

Details

The tool description (lines 546-564) includes this example:

{
  "query": "latest AI research papers 2023",
  "limit": 5,
  "lang": "en",
  "country": "us",
  "sources": [{ "type": "web" }]
}

But the Zod schema only defined query, limit, tbs, filter, location, sources, scrapeOptions, and enterprise — missing lang and country. Any MCP client LLM that followed the example would get a validation error.

Test plan

  • npm run build passes
  • Verified lang and country match the SDK's SearchParams interface
  • The execute handler uses { query, ...opts } destructuring, so new params are automatically forwarded to client.search()

🤖 Generated with Claude Code

The firecrawl_search tool's description examples show lang and country
parameters (e.g., "lang": "en", "country": "us"), but these were missing
from the Zod schema. This causes validation errors when LLMs follow the
documented examples. Both parameters are supported by the Firecrawl JS
SDK's SearchParams interface.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant