Skip to main content
Glama
sql-mcp
by ohankay

execute_procedure

Destructive

Run SQL Server stored procedures with named or positional parameters, capturing OUTPUT parameters and return values.

Instructions

Execute a stored procedure with named (or positional) parameters and capture OUTPUT params + return value.

procedure: 'dbo.MyProc' or '[db].[schema].[proc]'. params: {"CustomerId": 5, "Name": "x"} (the @ is optional) or a positional list. output_params: {"Total": "decimal(18,2)", "Msg": "nvarchar(4000)"} - a key also present in params is INPUT/OUTPUT.

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": {
      "procedure": "<procedure>"
    },
    "name": "execute_procedure"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNo
databaseNo
max_rowsNo
procedureYes
connectionNo
output_paramsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is covered; the description adds real value by disclosing the INPUT/OUTPUT parameter duality and that OUTPUT params and a return value are captured. It says nothing about transaction/commit behavior, permission requirements, or side effects of the procedure itself, which matters for a destructive, non-idempotent call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and then one compact line per parameter; there is essentially no filler. The terse, example-heavy formatting is slightly harder to parse than prose but every line earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter destructive tool with no output schema and no schema descriptions, the definition covers the core calling convention but omits three parameters entirely and does not describe the shape of the returned rows/return value it promises to capture. Adequate to invoke a simple case, thin for the harder ones.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden; it does a good job on procedure (qualified-name syntax), params (named map with optional @, or positional list) and output_params (type strings, INPUT/OUTPUT overlap rule). However database, connection and max_rows — half the parameters — receive no mention anywhere, so the compensation is only partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Execute a stored procedure") and adds the capturing of OUTPUT params and return value, which distinguishes it from a plain SQL statement runner. It does not name the sibling execute_sql or explain the distinction explicitly, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains how to call the tool but never when to prefer it over execute_sql or the transaction tools. There are no prerequisites, exclusions, or alternative-routing hints, leaving the agent to infer that a stored procedure (rather than ad-hoc SQL) is the right choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.