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

Commit ef45e12

Browse files
authored
Clarify tool support for both local and remote URLs (#447)
This commit updates tool prompts to explicitly highlight that some tools can accept both local file paths and remote URLs. The improved prompts ensure LLMs understand they may pass remote resources.
1 parent 3cd8e84 commit ef45e12

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

crewai_tools/tools/csv_search_tool/csv_search_tool.py

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

33
from embedchain.models.data_type import DataType
44
from pydantic import BaseModel, Field
@@ -18,7 +18,7 @@ class FixedCSVSearchToolSchema(BaseModel):
1818
class CSVSearchToolSchema(FixedCSVSearchToolSchema):
1919
"""Input for CSVSearchTool."""
2020

21-
csv: str = Field(..., description="Mandatory csv path you want to search")
21+
csv: str = Field(..., description="File path or URL of a CSV file to be searched")
2222

2323

2424
class CSVSearchTool(RagTool):

crewai_tools/tools/docx_search_tool/docx_search_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class FixedDOCXSearchToolSchema(BaseModel):
1010
"""Input for DOCXSearchTool."""
1111

1212
docx: Optional[str] = Field(
13-
..., description="Mandatory docx path you want to search"
13+
..., description="File path or URL of a DOCX file to be searched"
1414
)
1515
search_query: str = Field(
1616
...,

crewai_tools/tools/json_search_tool/json_search_tool.py

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

3-
from embedchain.models.data_type import DataType
43
from pydantic import BaseModel, Field
54

65
from ..rag.rag_tool import RagTool
@@ -18,7 +17,9 @@ class FixedJSONSearchToolSchema(BaseModel):
1817
class JSONSearchToolSchema(FixedJSONSearchToolSchema):
1918
"""Input for JSONSearchTool."""
2019

21-
json_path: str = Field(..., description="Mandatory json path you want to search")
20+
json_path: str = Field(
21+
..., description="File path or URL of a JSON file to be searched"
22+
)
2223

2324

2425
class JSONSearchTool(RagTool):

crewai_tools/tools/mdx_search_tool/mdx_search_tool.py

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

33
from embedchain.models.data_type import DataType
44
from pydantic import BaseModel, Field
@@ -18,7 +18,7 @@ class FixedMDXSearchToolSchema(BaseModel):
1818
class MDXSearchToolSchema(FixedMDXSearchToolSchema):
1919
"""Input for MDXSearchTool."""
2020

21-
mdx: str = Field(..., description="Mandatory mdx path you want to search")
21+
mdx: str = Field(..., description="File path or URL of a MDX file to be searched")
2222

2323

2424
class MDXSearchTool(RagTool):

crewai_tools/tools/pdf_search_tool/pdf_search_tool.py

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

33
from embedchain.models.data_type import DataType
4-
from pydantic import BaseModel, Field, model_validator
4+
from pydantic import BaseModel, Field
55

66
from ..rag.rag_tool import RagTool
77

@@ -17,7 +17,7 @@ class FixedPDFSearchToolSchema(BaseModel):
1717
class PDFSearchToolSchema(FixedPDFSearchToolSchema):
1818
"""Input for PDFSearchTool."""
1919

20-
pdf: str = Field(..., description="Mandatory pdf path you want to search")
20+
pdf: str = Field(..., description="File path or URL of a PDF file to be searched")
2121

2222

2323
class PDFSearchTool(RagTool):

crewai_tools/tools/txt_search_tool/txt_search_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class FixedTXTSearchToolSchema(BaseModel):
1717
class TXTSearchToolSchema(FixedTXTSearchToolSchema):
1818
"""Input for TXTSearchTool."""
1919

20-
txt: str = Field(..., description="Mandatory txt path you want to search")
20+
txt: str = Field(..., description="File path or URL of a TXT file to be searched")
2121

2222

2323
class TXTSearchTool(RagTool):

crewai_tools/tools/xml_search_tool/xml_search_tool.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from typing import Any, Optional, Type
1+
from typing import Optional, Type
22

3-
from embedchain.models.data_type import DataType
43
from pydantic import BaseModel, Field
54

65
from ..rag.rag_tool import RagTool
@@ -18,7 +17,7 @@ class FixedXMLSearchToolSchema(BaseModel):
1817
class XMLSearchToolSchema(FixedXMLSearchToolSchema):
1918
"""Input for XMLSearchTool."""
2019

21-
xml: str = Field(..., description="Mandatory xml path you want to search")
20+
xml: str = Field(..., description="File path or URL of a XML file to be searched")
2221

2322

2423
class XMLSearchTool(RagTool):

0 commit comments

Comments
 (0)