def ReadWrite(...): table_properties = <get table properties> record_str = llm.complete("Using the query and table properties, do X") record = parse_record_str(record_str) write_record(record)
FunctionTool
from llama_index.tools import FunctionTool tool = FunctionTool.from_defaults(fn=ReadWrite)