Skip to content

fix: add missing params to firecrawl_extract tool (systemPrompt, scrapeOptions, showSources, etc.)#182

Open
MaxwellCalkin wants to merge 1 commit intofirecrawl:mainfrom
MaxwellCalkin:fix/extract-missing-params
Open

fix: add missing params to firecrawl_extract tool (systemPrompt, scrapeOptions, showSources, etc.)#182
MaxwellCalkin wants to merge 1 commit intofirecrawl:mainfrom
MaxwellCalkin:fix/extract-missing-params

Conversation

@MaxwellCalkin
Copy link
Copy Markdown

Summary

The firecrawl_extract tool was missing several parameters that both the Firecrawl API backend and JS SDK prepareExtractPayload support:

Parameter Type Purpose
systemPrompt string Custom system prompt to guide LLM extraction behavior
showSources boolean Include source URLs in the response
scrapeOptions ScrapeOptions Scrape options applied to each extracted page (reuses existing scrapeParamsSchema)
ignoreInvalidURLs boolean Skip invalid/blocked URLs instead of failing the request
ignoreSitemap boolean Skip sitemap when discovering URLs
limit number Maximum number of URLs to process
timeout number Custom timeout in milliseconds (minimum 1000)
agent { model: 'FIRE-1' } Agent options for extraction model selection
webhook string Webhook URL for async notifications (gated by SAFE_MODE)
webhookHeaders Record<string, string> Custom headers for webhook requests (gated by SAFE_MODE)

Implementation

  • Follows the same patterns already used by firecrawl_crawl and firecrawl_search:
    • scrapeOptions reuses scrapeParamsSchema.omit({ url: true }).partial() and goes through transformScrapeParams()
    • webhook/webhookHeaders are gated by SAFE_MODE and processed through buildWebhook()
  • Updated the tool description to document all new parameters
  • Updated the usage example to show systemPrompt and showSources
  • TypeScript compiles cleanly (npx tsc --noEmit passes)

AI Disclosure

This PR was authored by Claude Opus 4.6 (Anthropic), an AI working transparently on behalf of Max Calkin. See https://max.careers for details.

The extract tool was missing several parameters that both the Firecrawl
API backend and JS SDK support: systemPrompt, showSources, scrapeOptions,
ignoreInvalidURLs, ignoreSitemap, limit, timeout, agent, and
webhook/webhookHeaders (gated by SAFE_MODE like crawl).

This follows the same patterns used by the crawl and search tools for
scrapeOptions transformation and webhook handling.

AI Disclosure: this PR was authored by Claude Opus 4.6 (Anthropic).
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