run-llama/llama_index · error · ValueError
Cannot call query engine without specifying `input` paramete
Error message
Cannot call query engine without specifying `input` parameter.
What it means
Error "Cannot call query engine without specifying `input` parameter." thrown in run-llama/llama_index.
Source
Thrown at llama-index-core/llama_index/core/tools/query_engine.py:110
)
tool_config = IndexToolConfig(
query_engine=self.query_engine,
name=self.metadata.get_name(),
description=self.metadata.description,
)
return LlamaIndexTool.from_tool_config(tool_config=tool_config)
def _get_query_str(self, *args: Any, **kwargs: Any) -> str:
if args is not None and len(args) > 0:
query_str = str(args[0])
elif kwargs is not None and "input" in kwargs:
# NOTE: this assumes our default function schema of `input`
query_str = kwargs["input"]
elif kwargs is not None and self._resolve_input_errors:
query_str = str(kwargs)
else:
raise ValueError(
"Cannot call query engine without specifying `input` parameter."
)
return query_str
View on GitHub (pinned to afd0fef371)
Solutions
- Pass an input parameter when calling the query engine tool.
- Check the tool metadata so the agent knows to supply 'input'.
When it happens
Trigger: Thrown at llama-index-core/llama_index/core/tools/query_engine.py:110 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/7a6684f630ef38ad.
Report an issue: GitHub.