Skip to main content
Glama
vicagbasi

MSSQL MCP Server

by vicagbasi

Get Stored Procedure Definition

get_stored_procedure_definition

Retrieve 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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoSchema name (default: dbo)
formatOutputNoFormat the SQL output for better readability (default: true)
procedureNameYesName of the stored procedure to get definition for
connectionNameNoNamed connection to use (e.g., 'production', 'staging')
Behavior2/5

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

No annotations are provided, so the description must convey behavioral traits. It only states that it retrieves source code. Missing details on whether the operation is read-only, required permissions, error behavior on missing procedures, or performance implications.

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?

Single sentence that is clear and front-loaded. Could be slightly more structured by separating purpose and behavior, but it is appropriately concise without unnecessary words.

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?

With no output schema, the description explains the return value (SQL source code). All parameters are documented in the schema. However, missing context about connectionName usage, default schema behavior, and whether formatOutput affects only syntax style or content.

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?

Input schema has 100% description coverage for all 4 parameters, so the schema itself documents them well. The description does not add extra meaning beyond stating it returns source code, not referencing any parameter specifics.

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

Purpose5/5

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

The description clearly states the verb 'Get', the resource 'stored procedure definition', and explicitly clarifies it is 'the actual source code'. This differentiates it from sibling tools like 'describe_stored_procedure' which likely return metadata.

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 versus siblings such as 'get_all_stored_procedure_definitions' or 'describe_stored_procedure'. Does not mention prerequisites, when not to use, or alternatives.

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/vicagbasi/mssql-mcp'

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