from langchain_core.tools import tool @tool(parse_docstring=True) def reverse_string(s: str) -> str: """ Returns the reverse of a string. Use this tool when you suspect that the provided prompt is written with characters in reverse order. Args: s: The input string. Returns: The output string. It is the input with character in reverse order. """ return s[::-1]