{"record":{"id":"84e1187412b28936","repo":"run-llama/llama_index","slug":"cannot-call-query-engine-without-inputs","errorCode":null,"errorMessage":"Cannot call query engine without inputs","messagePattern":"Cannot call query engine without inputs","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/tools/retriever_tool.py","lineNumber":85,"sourceCode":"\n    @property\n    def retriever(self) -> BaseRetriever:\n        return self._retriever\n\n    @property\n    def metadata(self) -> ToolMetadata:\n        return self._metadata\n\n    def call(self, *args: Any, **kwargs: Any) -> ToolOutput:\n        query_str = \"\"\n        if args is not None:\n            query_str += \", \".join([str(arg) for arg in args]) + \"\\n\"\n        if kwargs is not None:\n            query_str += (\n                \", \".join([f\"{k!s} is {v!s}\" for k, v in kwargs.items()]) + \"\\n\"\n            )\n        if query_str == \"\":\n            raise ValueError(\"Cannot call query engine without inputs\")\n\n        docs = self._retriever.retrieve(query_str)\n        docs = self._apply_node_postprocessors(docs, QueryBundle(query_str))\n        content = \"\"\n        for doc in docs:\n            assert isinstance(doc.node, (Node, TextNode))\n            node_copy = doc.node.model_copy()\n            content += node_copy.get_content(MetadataMode.LLM) + \"\\n\\n\"\n        return ToolOutput(\n            content=content,\n            tool_name=self.metadata.get_name(),\n            raw_input={\"input\": query_str},\n            raw_output=docs,\n        )\n\n    async def acall(self, *args: Any, **kwargs: Any) -> ToolOutput:\n        query_str = \"\"\n        if args is not None:","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/tools/retriever_tool.py#L67-L103","documentation":"Error \"Cannot call query engine without inputs\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/tools/retriever_tool.py:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass inputs when calling the retriever tool's query engine.","Verify the tool schema so the calling agent supplies the required input."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}