from llama_index.core.tools import FunctionTool def reverse_text(text: str) -> str: """It returns the reversed string of text in the input.""" return text[::-1] reverse_text_tool = FunctionTool.from_defaults( reverse_text, name="reverse_text_tool", description="It returns the reversed string of text in the input.", )