{"record":{"id":"47d32c1610b3e263","repo":"run-llama/llama_index","slug":"real-function-is-not-set","errorCode":null,"errorMessage":"Real function is not set!","messagePattern":"Real function is not set!","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/tools/function_tool.py","lineNumber":287,"sourceCode":"    def metadata(self) -> ToolMetadata:\n        \"\"\"Metadata.\"\"\"\n        return self._metadata\n\n    @property\n    def fn(self) -> Callable[..., Any]:\n        \"\"\"Function.\"\"\"\n        return self._fn\n\n    @property\n    def async_fn(self) -> AsyncCallable:\n        \"\"\"Async function.\"\"\"\n        return self._async_fn\n\n    @property\n    def real_fn(self) -> Union[Callable[..., Any], AsyncCallable]:\n        \"\"\"Real function.\"\"\"\n        if self._real_fn is None:\n            raise ValueError(\"Real function is not set!\")\n\n        return self._real_fn\n\n    def _parse_tool_output(self, raw_output: Any) -> List[ContentBlock]:\n        \"\"\"Parse tool output into content blocks.\"\"\"\n        if isinstance(\n            raw_output,\n            (\n                TextBlock,\n                ImageBlock,\n                AudioBlock,\n                CitableBlock,\n                CitationBlock,\n                DocumentBlock,\n                VideoBlock,\n            ),\n        ):\n            return [raw_output]","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/tools/function_tool.py#L269-L305","documentation":"Error \"Real function is not set!\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/tools/function_tool.py:287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the real function via fn before calling the tool.","Construct the tool with FunctionTool.from_defaults(fn=...) so the function is attached."],"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-15T22:17:37.221Z"}