RagTool._run() missing 1 required positional argument: 'query'

I encountered an error while trying to use the tool. This was the error: RagTool._run() missing 1 required positional argument: ‘query’.
Tool Search a PDF’s content accepts these inputs: A tool that can be used to semantic search a query the ./Ahmad_Liaqat__Resume__28_03_2025.pdf PDF’s content.

Can you share more details about how you are instantiating and using the tool?

Hi Ahmad, I was faced with the same issue and fixed with the code below.

Create a RAG tool with default settings

class input(BaseModel):
	query: str

rag_tool = RagTool(
	name="RaG Tool Knowledge Base", 
	temperature=0.0,
	args_schema=input
1 Like