feat: implement cancel crawl functionality in MCP server #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: implement cancel crawl functionality in MCP server
Summary
Adds a new
firecrawl_cancel_crawl
tool to the Firecrawl MCP server that allows users to cancel running crawl jobs. This implementation leverages the existingcancelCrawl
method from the Firecrawl JS SDK and follows the same patterns as other tools in the server.Key Changes:
CANCEL_CRAWL_TOOL
definition with proper input schema and documentationThe tool accepts a crawl job ID and returns a confirmation message when the cancellation is successful.
Review & Testing Checklist for Human
cancelCrawl
method behavior with a real Firecrawl instance to ensure the response format matches our assumptions (success/error fields)Recommended Test Plan:
firecrawl_crawl
toolfirecrawl_cancel_crawl
with the job IDfirecrawl_check_crawl_status
Diagram
Notes
StatusCheckOptions
interface for type validation since both cancel and status check operations only require anid
fieldwithRetry
wrapper, consistent with other toolsLink to Devin run: https://app.devin.ai/sessions/6da4eeb600f44cad9e9ec98342e50b36
Requested by: @nickscamara