tools_get_docs function

Extract documentation from a function