Get Stored Procedure Definition
get_stored_procedure_definitionRetrieve the complete SQL source code of a stored procedure from a Microsoft SQL Server database to review or analyze its logic.
Instructions
Get the complete SQL query/definition of a stored procedure - this is the actual source code
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"procedureName": "<procedureName>"
},
"name": "get_stored_procedure_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Schema name (default: dbo) | |
| formatOutput | No | Format the SQL output for better readability (default: true) | |
| procedureName | Yes | Name of the stored procedure to get definition for | |
| connectionName | No | Named connection to use (e.g., 'production', 'staging') |