Skip to content

Send objective with Search feedback - #474

Closed
KrisOei wants to merge 1 commit into
mainfrom
feat/search-feedback-objective
Closed

KrisOei wants to merge 1 commit into
mainfrom
feat/search-feedback-objective

Conversation

@KrisOei

@KrisOei KrisOei commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds objective to firecrawl_search_feedback: the underlying goal behind the search.

Requires firecrawl/firecrawl#4904 to be deployed first.

Checks

Build, lint, and 90 tests passed.

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

1 issue found across 2 files

Confidence score: 5/5

  • src/index.ts has mismatched objective limits: values accepted by firecrawl_search above 2,000 characters may be rejected when reused by the capped field. Align the limits or handle longer values before reuse.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. 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. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/index.ts">

<violation number="1" location="src/index.ts:3410">
P3: This `objective` caps at 2000 characters, but `firecrawl_search`'s own `objective` (src/index.ts line 999, `z.string().trim().min(1).max(5000)`) allows up to 5000. An agent that reuses the search's objective value when submitting feedback hits a schema validation error for objectives between 2001 and 5000 characters. Align the caps via a shared constant or document why the feedback limit is tighter.</violation>
</file>

Requires human review: Adds an optional objective to firecrawl_search_feedback and forwards it in the request body; this changes the public MCP tool contract and leaves an unaddressed 2000-vs-5000 cap mismatch with firecrawl_search, so human sign-off is needed.

Fix all with cubic | Re-trigger cubic

Comment thread src/index.ts
'longer `description`.'
),
querySuggestions: z.string().max(2000).optional(),
objective: z

@cubic-dev-ai cubic-dev-ai Bot Oct 2, 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 objective caps at 2000 characters, but firecrawl_search's own objective (src/index.ts line 999, z.string().trim().min(1).max(5000)) allows up to 5000. An agent that reuses the search's objective value when submitting feedback hits a schema validation error for objectives between 2001 and 5000 characters. Align the caps via a shared constant or document why the feedback limit is tighter.

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 src/index.ts, line 3410:

<comment>This `objective` caps at 2000 characters, but `firecrawl_search`'s own `objective` (src/index.ts line 999, `z.string().trim().min(1).max(5000)`) allows up to 5000. An agent that reuses the search's objective value when submitting feedback hits a schema validation error for objectives between 2001 and 5000 characters. Align the caps via a shared constant or document why the feedback limit is tighter.</comment>

<file context>
@@ -3407,6 +3407,16 @@ Eligibility is limited to successful searches within the feedback age window. Th
             'longer `description`.'
         ),
       querySuggestions: z.string().max(2000).optional(),
+      objective: z
+        .string()
+        .trim()
</file context>
Fix with cubic

@KrisOei

KrisOei commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing: not proceeding with this change for now.

@KrisOei KrisOei closed this Oct 2, 2026
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