Skip to main content
Glama
dkp5897

SQL Server MCP Server

by dkp5897

sql_get_stored_proc_def

Retrieve the full source code of any stored procedure in SQL Server to inspect, debug, or reuse its logic.

Instructions

Get the full definition (source code) of a stored procedure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesStored procedure name
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states it returns 'the full definition (source code)' which is helpful, but doesn't disclose whether this is a read-only operation, whether it requires special permissions, what happens if the procedure doesn't exist (error vs empty), or whether the output is in a specific dialect. For a read operation with no annotations, some additional transparency would help.

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?

The description is a single, efficient sentence with zero waste. It's appropriately sized for a simple single-parameter task. Could arguably add a sentence about sourcing names from sql_list_stored_procs, but as-is it's economical and clear.

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?

The tool is low-complexity (1 param, no output schema, no nested objects), so a minimal description is somewhat acceptable. However, without annotations and with no guidance on prerequisites (e.g., does the procedure need to exist, can it be schema-qualified), and no alternative tool referral, it falls short of fully complete. The lack of any usage guidance leaves the description at minimum viable rather than complete.

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 100% (the 'name' parameter has a description), so the baseline is 3. The description adds little semantic value beyond the schema—'Stored procedure name' in the schema sufficiently covers the parameter meaning. The description doesn't clarify edge cases like case-sensitivity, schema qualification, or how to find valid names.

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?

The description clearly states the verb+resource: 'Get the full definition (source code) of a stored procedure.' It's specific about what it returns. However, it doesn't distinguish from sibling tools like sql_list_stored_procs (which lists procedures) and sql_inspect_table (which inspects structures), though the purpose of retrieving source code is distinct enough that sibling differentiation is mostly implicit.

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?

No guidance on when to use this tool vs alternatives. It doesn't clarify whether the procedure name must be exactly as listed by sql_list_stored_procs, whether it requires a database selection context, or when someone should use sql_inspect_table or sql_get_query_plan instead. The tool name alone suggests its use case but the description adds no explicit context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkp5897/sql-server-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server