How does PDFRag Tool find relevant context

planner = Agent(
    role="Content planner",
    goal="Plan engaging and factually accurate content on {topic}",
    backstory = "You are working on planning a blog article about the topic : {topic}.  You collect information that helps the audience learn something and make informed decision. Your work is the basis for the content writer to write an article on this topic.",
    tools = [PDFSearchTool(
    pdf=r"path/to/my/pdf",
    config=dict(
        llm=dict(
            provider="ollama",
            config=dict(
                model="deepseek-r1:8b"
            ),
        ),
        embedder=dict(
            provider="huggingface",  
            config=dict(
                model="sentence-transformers/all-mpnet-base-v2"
            ),
        ),
	)
)],
    allow_delegation=False,
    verbose=True,
    llm = llm
)

Is this the correct way to use this tool , also i want to know how is the query/question provided to the tool as in my case i am not getting any context in my response. Also for some reason i am getting the following error.

I encountered an error while trying to use the tool. This was the error: Arguments validation failed: 1 validation error for FixedPDFSearchToolSchema
query
Input should be a valid string [type=string_type, input_value={‘description’: ‘Net prof…2023-24’, ‘type’: ‘str’}, input_type=dict]
For further information visit Redirecting....
Tool Search a PDF’s content accepts these inputs: Tool Name: Search a PDF’s content
Tool Arguments: {‘query’: {‘description’: “Mandatory query you want to use to search the PDF’s content”, ‘type’: ‘str’}}
Tool Description: A tool that can be used to semantic search a query the F:\Enterprise-Ai\MultiAgent Framework\standalone.pdf PDF’s content.