This repository was archived by the owner on Nov 10, 2025. It is now read-only.
Fix firecrawl tool (Too many positional arguments)#275
Merged
lucasgomide merged 6 commits intocrewAIInc:mainfrom Apr 28, 2025
Merged
Fix firecrawl tool (Too many positional arguments)#275lucasgomide merged 6 commits intocrewAIInc:mainfrom
lucasgomide merged 6 commits intocrewAIInc:mainfrom
Conversation
Was leading to an error too many arguments when calling the craw_url() function
Corrected to avoid too many arguments error when calling firecrawl scrape_url function
Corrected to avoid error too many arguments when calling firecrawl search() function
lucasgomide
approved these changes
Apr 28, 2025
Contributor
lucasgomide
left a comment
There was a problem hiding this comment.
@benzakritesteur do you mind to sync with main?
Currently we pre-defined the available paramenters to call Firecrawl, this commit adds support to receive any parameter and propagate them
lorenzejay
approved these changes
Apr 28, 2025
Contributor
lorenzejay
left a comment
There was a problem hiding this comment.
lets just add the moved arguments as doc strings on the tool class itself 🙏🏼 and we should be gold
Comment on lines
+24
to
+37
| config: Optional[dict[str, Any]] = Field( | ||
| default_factory=lambda: { | ||
| "max_depth": 2, | ||
| "ignore_sitemap": True, | ||
| "limit": 100, | ||
| "allow_backward_links": False, | ||
| "allow_external_links": False, | ||
| "scrape_options": ScrapeOptions( | ||
| formats=["markdown", "screenshot", "links"], | ||
| only_main_content=True, | ||
| timeout=30000, | ||
| ), | ||
| } | ||
| ) |
| crawling_options["scrapeOptions"]["timeout"] = timeout | ||
|
|
||
| return self._firecrawl.crawl_url(url, crawling_options) | ||
| def _run(self, url: str): |
Contributor
There was a problem hiding this comment.
awesome moving to config
lorenzejay
approved these changes
Apr 28, 2025
Contributor
|
Closes crewAIInc/crewAI#2697, #226 |
mplachta
pushed a commit
to mplachta/crewAI-tools
that referenced
this pull request
Aug 27, 2025
* Corrected to adapt to firecrawl package use Was leading to an error too many arguments when calling the craw_url() function * Corrected to adapt to firecrawl package use Corrected to avoid too many arguments error when calling firecrawl scrape_url function * Corrected to adapt to firecrawl package use Corrected to avoid error too many arguments when calling firecrawl search() function * fix: fix firecrawl integration * feat: support define Firecrawl using any config Currently we pre-defined the available paramenters to call Firecrawl, this commit adds support to receive any parameter and propagate them * docs: added doc string to Firecrawls classes --------- Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Corrected error when calling all 3 Firecrawl tools :
Passing optional variables in a dict a **kwargs for the firecrawl-py python package was not working.
Indeed, firecrawl uses :
So calling :
leads to a Too many positional arguments error