Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit f86c6ac

Browse files
authored
Fix FirecrawlScrapeWebsiteTool (#298)
* fix FirecrawlScrapeWebsiteTool: add missing config parameter and correct Dict type annotation - Add required config parameter when creating the tool - Change type hint from `dict` to `Dict` to resolve Pydantic validation issues * Update firecrawl_scrape_website_tool.py - removing optional config - removing timeout from Pydantic model * Removing config from __init__ - removing config from __init__ * Update firecrawl_scrape_website_tool.py - removing timeout
1 parent b84543e commit f86c6ac

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

crewai_tools/tools/firecrawl_scrape_website_tool/firecrawl_scrape_website_tool.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Optional, Type
1+
from typing import Any, Optional, Type, Dict
22

33
from crewai.tools import BaseTool
44
from pydantic import BaseModel, ConfigDict, Field, PrivateAttr
@@ -8,14 +8,8 @@
88
except ImportError:
99
FirecrawlApp = Any
1010

11-
1211
class FirecrawlScrapeWebsiteToolSchema(BaseModel):
1312
url: str = Field(description="Website URL")
14-
timeout: Optional[int] = Field(
15-
default=30000,
16-
description="Timeout in milliseconds for the scraping operation. The default value is 30000.",
17-
)
18-
1913

2014
class FirecrawlScrapeWebsiteTool(BaseTool):
2115
"""
@@ -31,6 +25,8 @@ class FirecrawlScrapeWebsiteTool(BaseTool):
3125
include_tags (list[str]): Tags to include. Default: []
3226
exclude_tags (list[str]): Tags to exclude. Default: []
3327
headers (dict): Headers to include. Default: {}
28+
wait_for (int): Time to wait for page to load in ms. Default: 0
29+
json_options (dict): Options for JSON extraction. Default: None
3430
"""
3531

3632
model_config = ConfigDict(
@@ -40,7 +36,7 @@ class FirecrawlScrapeWebsiteTool(BaseTool):
4036
description: str = "Scrape webpages using Firecrawl and return the contents"
4137
args_schema: Type[BaseModel] = FirecrawlScrapeWebsiteToolSchema
4238
api_key: Optional[str] = None
43-
config: Optional[dict[str, Any]] = Field(
39+
config: Dict[str, Any] = Field(
4440
default_factory=lambda: {
4541
"formats": ["markdown"],
4642
"only_main_content": True,

0 commit comments

Comments
 (0)