Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1283,10 +1283,13 @@ The existing `firecrawl_feedback` tool accepts `endpoint: "alexandria"`:
"url": "https://example.com",
"requestedFunctionality": "Find records and download their attachments"
},
"objective": "Compare contract requirements across agencies before bidding",
"rationale": "Found summaries but could not retrieve attachments"
}
```

`objective` is the underlying goal of the session: what the agent or its user was ultimately trying to accomplish, beyond the single website in `requestedWebsite`.

This uses authenticated `POST /v2/feedback`, without a job ID, job-age deadline, or credit refund. Optional `providerFeedback` and `capabilityFeedback` arrays describe coverage gaps and execution issues; the tool schema lists supported issue values. A `new_capability_request` requires `requestedFunctionality`; `missing_capability` (the provider exists but lacks the capability) does not. Existing feedback opt-out and authentication controls apply.

Eligible Alexandria execution and discovery results include a `feedbackTool` pointer with the tool name and a skeleton of the arguments. The pointer is omitted for Firecrawl-internal calls such as `bash` and when `firecrawl_feedback` is not registered (`FIRECRAWL_NO_ENDPOINT_FEEDBACK` or keyless startup).
2 changes: 1 addition & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firecrawl",
"version": "3.27.0",
"version": "3.27.1",
"description": "Official Firecrawl MCP for web search, scraping, crawling, and structured data extraction.",
"mcpServers": {
"firecrawl": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firecrawl-mcp",
"version": "3.27.0",
"version": "3.27.1",
"description": "MCP server for Firecrawl — search, scrape, and interact with the web, and search scientific papers. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, LLM-powered content analysis, and research paper search over biomedical and arXiv literature (PubMed, bioRxiv, medRxiv, arXiv) with citation-graph expansion and full-text reading.",
"type": "module",
"mcpName": "io.github.firecrawl/firecrawl-mcp-server",
Expand Down
3 changes: 3 additions & 0 deletions src/alexandria-feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const alexandriaFeedbackFields = {
})
.optional(),
rationale: detail.optional(),
objective: detail.optional(),
providerFeedback: z
.array(
z.strictObject({
Expand Down Expand Up @@ -67,6 +68,7 @@ export const ALEXANDRIA_FEEDBACK_HINT = {
url: '<website the user needed data from>',
requestedFunctionality: '<what they needed from it>',
},
objective: '<underlying goal of the task>',
rationale: '<why this rating, from observed results>',
providerFeedback:
'<optional [{name, issue, why}]: providers that were missing, thin, or unavailable>',
Expand Down Expand Up @@ -100,4 +102,5 @@ export const alexandriaSessionFeedbackSchema = z.strictObject({
...alexandriaFeedbackFields,
requestedWebsite: alexandriaFeedbackFields.requestedWebsite.unwrap(),
rationale: detail,
objective: detail,
});
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3507,7 +3507,7 @@ if (alexandriaFeedbackAvailable()) {
description: `
Submit concise quality feedback for a completed search, scrape, parse, or map job. Provide the endpoint, job ID, rating, and relevant issue codes or small contextual fields; omit large page contents and raw outputs.
For an Alexandria session, set endpoint to \`alexandria\`, omit jobId, and provide requestedWebsite (url and requestedFunctionality), rationale, and rating. Optional providerFeedback and capabilityFeedback describe gaps or errors. Capability issues: new_capability_request (requires requestedFunctionality), missing_capability, insufficient_functionality, incorrect_result, execution_error, other. Alexandria feedback has no job-age deadline and no credit refund.
For an Alexandria session, set endpoint to \`alexandria\`, omit jobId, and provide requestedWebsite (url and requestedFunctionality), objective, rationale, and rating. objective is the underlying goal behind the session: what you or your user were ultimately trying to accomplish (for example, "shortlist federal IT contracts to bid on this quarter"), not only what was needed from this website. Optional providerFeedback and capabilityFeedback describe gaps or errors. Capability issues: new_capability_request (requires requestedFunctionality), missing_capability, insufficient_functionality, incorrect_result, execution_error, other. Alexandria feedback has no job-age deadline and no credit refund.
Returns submission status, feedback ID, and accounting fields.
`,
Expand Down
1 change: 1 addition & 0 deletions tests/mcp-alexandria-feedback-hints.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function assertFeedbackHint(payload) {
assert.equal(payload.feedbackTool?.name, 'firecrawl_feedback');
assert.equal(payload.feedbackTool.arguments.endpoint, 'alexandria');
assert.match(payload.feedbackTool.arguments.requestedWebsite.url, /website/i);
assert.match(payload.feedbackTool.arguments.objective, /goal/i);
assert.match(payload.feedbackTool.when, /^Optional after task completion; at most once per website/i);
}

Expand Down
4 changes: 4 additions & 0 deletions tests/mcp-smoke.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,7 @@ test('stdio transport calls Firecrawl API through a tool end to end', async (t)
const sessionFeedback = {
endpoint: 'alexandria', rating: 'partial',
requestedWebsite: { url: 'https://example.com', requestedFunctionality: 'Download attachments' },
objective: 'Compare contract requirements across agencies',

@cubic-dev-ai cubic-dev-ai Bot Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This only exercises a short, already-trimmed value, so it will not catch regressions in the trimming or 2,000-character limit. Add cases for padded input and a 2,001-character objective, asserting the forwarded value is trimmed and the oversized value is rejected.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At tests/mcp-smoke.test.mjs, line 1813:

<comment>This only exercises a short, already-trimmed value, so it will not catch regressions in the trimming or 2,000-character limit. Add cases for padded input and a 2,001-character objective, asserting the forwarded value is trimmed and the oversized value is rejected.</comment>

<file context>
@@ -1810,6 +1810,7 @@ test('stdio transport calls Firecrawl API through a tool end to end', async (t)
   const sessionFeedback = {
     endpoint: 'alexandria', rating: 'partial',
     requestedWebsite: { url: 'https://example.com', requestedFunctionality: 'Download attachments' },
+    objective: 'Compare contract requirements across agencies',
     rationale: 'Only summaries available',
     capabilityFeedback: [{ name: 'attachments', provider: 'example', issue: 'new_capability_request', why: 'Missing attachments', requestedFunctionality: 'Return document links' }],
</file context>
Fix with cubic

rationale: 'Only summaries available',
capabilityFeedback: [{ name: 'attachments', provider: 'example', issue: 'new_capability_request', why: 'Missing attachments', requestedFunctionality: 'Return document links' }],
};
Expand All @@ -1829,6 +1830,8 @@ test('stdio transport calls Firecrawl API through a tool end to end', async (t)
for (const invalid of [
{ endpoint: 'scrape', rating: 'good' },
{ endpoint: 'alexandria', rating: 'good' },
{ ...sessionFeedback, objective: undefined },
{ ...sessionFeedback, objective: ' ' },
{ ...sessionFeedback, jobId: '00000000-0000-4000-8000-000000000010' },
{ ...sessionFeedback, capabilityFeedback: [{ name: 'attachments', provider: 'example', issue: 'new_capability_request', why: 'Missing attachments' }] },
{ ...sessionFeedback, capabilityFeedback: [{ name: 'attachments', provider: 'example', issue: 'unknown_issue', why: 'Not a supported issue code' }] },
Expand All @@ -1841,6 +1844,7 @@ test('stdio transport calls Firecrawl API through a tool end to end', async (t)
for (const [field, value] of Object.entries({
requestedWebsite: sessionFeedback.requestedWebsite,
rationale: sessionFeedback.rationale,
objective: sessionFeedback.objective,
providerFeedback: [],
capabilityFeedback: sessionFeedback.capabilityFeedback,
})) {
Expand Down
Loading