diff --git a/README.md b/README.md index 094f65d9..5bf08075 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/gemini-extension.json b/gemini-extension.json index a7c3c1d2..985652f7 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -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": { diff --git a/package.json b/package.json index ad6f3050..c7c1bd95 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/alexandria-feedback.ts b/src/alexandria-feedback.ts index 4bfd0d29..bc4871dc 100644 --- a/src/alexandria-feedback.ts +++ b/src/alexandria-feedback.ts @@ -10,6 +10,7 @@ export const alexandriaFeedbackFields = { }) .optional(), rationale: detail.optional(), + objective: detail.optional(), providerFeedback: z .array( z.strictObject({ @@ -67,6 +68,7 @@ export const ALEXANDRIA_FEEDBACK_HINT = { url: '', requestedFunctionality: '', }, + objective: '', rationale: '', providerFeedback: '', @@ -100,4 +102,5 @@ export const alexandriaSessionFeedbackSchema = z.strictObject({ ...alexandriaFeedbackFields, requestedWebsite: alexandriaFeedbackFields.requestedWebsite.unwrap(), rationale: detail, + objective: detail, }); diff --git a/src/index.ts b/src/index.ts index e8dd29f6..c11fa946 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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. `, diff --git a/tests/mcp-alexandria-feedback-hints.test.mjs b/tests/mcp-alexandria-feedback-hints.test.mjs index 015ec90c..f808e006 100644 --- a/tests/mcp-alexandria-feedback-hints.test.mjs +++ b/tests/mcp-alexandria-feedback-hints.test.mjs @@ -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); } diff --git a/tests/mcp-smoke.test.mjs b/tests/mcp-smoke.test.mjs index c674c5c5..b630b406 100644 --- a/tests/mcp-smoke.test.mjs +++ b/tests/mcp-smoke.test.mjs @@ -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' }], }; @@ -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' }] }, @@ -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, })) {