To obtain metadata about stored routines:
Query the ROUTINES table of the INFORMATION_SCHEMA database. See Section 26.3.30, “The INFORMATION_SCHEMA ROUTINES Table”.
Use the SHOW CREATE PROCEDURE and SHOW CREATE FUNCTION statements to see routine definitions. See Section 13.7.7.9, “SHOW CREATE PROCEDURE Statement”.
Use the SHOW PROCEDURE STATUS and SHOW FUNCTION STATUS statements to see routine characteristics. See Section 13.7.7.28, “SHOW PROCEDURE STATUS Statement”.
Use the SHOW PROCEDURE CODE and SHOW FUNCTION CODE statements to see a representation of the internal implementation of the routine. See Section 13.7.7.27, “SHOW PROCEDURE CODE Statement”.