You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -565,12 +565,51 @@ Search the web and optionally extract content from search results.
565
565
566
566
**Returns:**
567
567
568
-
- Array of search results (with optional scraped content)
568
+
- Array of search results (with optional scraped content), plus an `id` field. Pass that `id` to `firecrawl_search_feedback` after you've used the results to refund 1 credit (search costs 2) and improve search quality.
569
569
570
570
**Prompt Example:**
571
571
572
572
> "Find the latest research papers on AI published in 2023."
Sends structured feedback on a previous `firecrawl_search` result. The first feedback per search id refunds 1 credit and improves Firecrawl's search quality. Idempotent per search id.
577
+
578
+
**Call this after every search you actually use** (or that didn't help). Bad/partial feedback with `missingContent` is just as valuable as good feedback.
579
+
580
+
**Opt out:** set `FIRECRAWL_NO_SEARCH_FEEDBACK=1` (or `FIRECRAWL_DISABLE_SEARCH_FEEDBACK=1`) in the environment when starting the MCP server. The `firecrawl_search_feedback` tool will not be registered, so agents can't call it. Team admins can also disable feedback server-side; in that case the tool is registered but always returns `feedbackErrorCode: "TEAM_OPTED_OUT"`.
581
+
582
+
**Most important field:**`missingContent`. It's an array of specific pieces of content the agent expected to find but did not. One entry per missing topic — these aggregate across teams and tell us what to index next.
583
+
584
+
**Daily refund cap (per team, per UTC day, default 100 credits).** Once a team's `creditsRefundedToday` reaches `dailyRefundCap`, further submissions still record feedback but no longer refund credits. The response sets `dailyCapReached: true`. Agents should stop calling this tool for the rest of the UTC day when they see that flag.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "firecrawl-mcp",
3
-
"version": "3.15.0",
3
+
"version": "3.16.0",
4
4
"description": "MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.",
Copy file name to clipboardExpand all lines: src/index.ts
+217-3Lines changed: 217 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -610,6 +610,7 @@ The query also supports search operators, that you can use if needed to refine t
610
610
**Domain filters:** Use includeDomains to restrict results to specific domains, or excludeDomains to remove domains. Do not use both in the same request. Domains must be hostnames only, without protocol or path.
611
611
**Scrape Options:** Only use scrapeOptions when you think it is absolutely necessary. When you do so default to a lower limit to avoid timeouts, 5 or lower.
612
612
**Optimal Workflow:** Search first using firecrawl_search without formats, then after fetching the results, use the scrape tool to get the content of the relevantpage(s) that you want to scrape
613
+
**After the search:** Once you have processed the results (or decided they were not useful), call \`firecrawl_search_feedback\` with the \`id\` from this response. The first feedback per search refunds 1 credit and helps Firecrawl improve search quality.
613
614
614
615
**Usage Example without formats (Preferred):**
615
616
\`\`\`json
@@ -646,7 +647,7 @@ The query also supports search operators, that you can use if needed to refine t
646
647
}
647
648
}
648
649
\`\`\`
649
-
**Returns:** Array of search results (with optional scraped content).
650
+
**Returns:** A JSON envelope of the form \`{ success, data: { web?, images?, news? }, id, creditsUsed }\`. Each result array contains the search results (with optional scraped content). Pass the top-level \`id\` to \`firecrawl_search_feedback\` after you've used the results.
650
651
`,
651
652
parameters: z
652
653
.object({
@@ -696,14 +697,227 @@ The query also supports search operators, that you can use if needed to refine t
696
697
excludeDomains
697
698
);
698
699
log.info('Searching',{query: searchQuery});
699
-
constres=awaitclient.search(searchQuery,{
700
+
// Call /v2/search through the SDK's HTTP layer (auth + retries) instead
701
+
// of `client.search()` so we preserve the full response envelope. The
702
+
// high-level `search()` helper strips `id` and `creditsUsed`, which
703
+
// breaks the `firecrawl_search_feedback` workflow that this server
704
+
// explicitly tells the LLM to use after every search.
'[firecrawl-mcp] Search feedback tool disabled by FIRECRAWL_NO_SEARCH_FEEDBACK; firecrawl_search_feedback will not be registered.'
736
+
);
737
+
}
738
+
739
+
if(!SEARCH_FEEDBACK_DISABLED){
740
+
server.addTool({
741
+
name: 'firecrawl_search_feedback',
742
+
annotations: {
743
+
title: 'Send feedback on a search result',
744
+
readOnlyHint: false,
745
+
openWorldHint: true,
746
+
},
747
+
description: `
748
+
Send structured feedback on a previous \`firecrawl_search\` result. **Call this immediately after a search where you used the results** so we can improve search quality and refund 1 credit (search costs 2).
749
+
750
+
Pass the \`searchId\` returned by \`firecrawl_search\` (the \`id\` field on the response) and tell us:
751
+
752
+
- **rating** — overall result quality: \`good\`, \`partial\`, or \`bad\`.
753
+
- **valuableSources** — which result URLs were actually useful, and a short reason why.
754
+
- **missingContent** — **the most important field.** An ARRAY of specific pieces of content you expected to find but didn't. One entry per missing piece, each with a short \`topic\` and an optional longer \`description\`. Examples: \`{"topic":"enterprise pricing","description":"no pricing tier table for the Enterprise plan was returned"}\`, \`{"topic":"API rate limits"}\`, \`{"topic":"comparison vs competitors"}\`. **Be specific** — these aggregate across teams and tell us what to index next. Do not pack multiple topics into one entry.
755
+
- **querySuggestions** — how the query or response shape could be improved (e.g. "would have liked official docs first", "should boost github.com").
756
+
757
+
**Substantive-feedback requirement** (zero-effort feedback is rejected with HTTP 400):
758
+
- \`good\` — must include at least one \`valuableSources\` entry
759
+
- \`partial\` — must include \`valuableSources\` or at least one \`missingContent\` entry
760
+
- \`bad\` — must include at least one \`missingContent\` entry or \`querySuggestions\`
761
+
762
+
**Time window:** Feedback must be submitted within ~2 minutes of the search. Beyond that, the call returns HTTP 409 with \`feedbackErrorCode: "FEEDBACK_WINDOW_EXPIRED"\` — do not retry, just move on. Same goes for any 4xx response: do not retry-loop.
763
+
764
+
**Behaviors:**
765
+
- Idempotent per \`searchId\`. Re-submitting for the same id returns \`alreadySubmitted: true\` with \`creditsRefunded: 0\`.
766
+
- Refund only applies to billable searches; preview teams are blocked.
767
+
- Failed searches cannot receive feedback (the search itself already returned an error you can act on).
768
+
- **Daily refund cap (per team, per UTC day, default 100 credits).** Once a team's \`creditsRefundedToday\` reaches \`dailyRefundCap\`, the response returns \`dailyCapReached: true\` with \`creditsRefunded: 0\`. The feedback is still recorded for search-quality improvement — only the credit refund is gated. **Stop calling this tool for the rest of the UTC day** when you see \`dailyCapReached: true\`.
769
+
770
+
**When to call:** Right after processing a search result. If the result didn't help, send rating \`bad\` with a clear \`missingContent\` — that is just as valuable as a \`good\` rating.
771
+
772
+
**Usage Example (good rating with valuable sources + missing content):**
0 commit comments