Skip to content

execute_procedure

Executes a stored procedure that is included in the authorized procedures list (whitelist).

NameTypeRequiredDescription
procedure_namestringYesName of the procedure to execute
parametersstringNoJSON object with parameter names and values

To use this tool, you must configure the environment variable:

Ventana de terminal
MSSQL_WHITELIST_PROCEDURES="sp_GetCustomerOrders,sp_GenerateReport"
{
"name": "execute_procedure",
"arguments": {
"procedure_name": "sp_GetCustomerOrders",
"parameters": "{\"customer_id\": 123}"
}
}
  • Only executes whitelisted procedures — Any unauthorized procedure is rejected
  • Name validation — Names are validated with regex ^[\w.\[\]]+$ to prevent injection
  • Dangerous procedures blockedxp_cmdshell, sp_configure, sp_executesql and others are explicitly blocked even if added to the whitelist
  • Security logging — Each execution is recorded in the security logs

In read-only mode, the following system procedures are allowed without needing to be whitelisted:

  • sp_help, sp_helptext, sp_helpindex
  • sp_columns, sp_tables
  • sp_fkeys, sp_pkeys
  • sp_databases