Skip to main content
Glama
elekto-com-br

Elekto MCP for SQL Server

Official

Stored procedure definition

get_procedure_definition
Read-onlyIdempotent

Retrieve the CREATE PROCEDURE text for a specific stored procedure to review its SQL definition. The server does not execute procedures; unreadable ones return null definition.

Instructions

Returns the CREATE PROCEDURE text of one stored procedure. Use it to read or review a procedure found with list_procedures; this server never executes procedures. A procedure the login can see but not read comes back with definition null and definition_visible false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoProcedure schema. Empty searches every schema. Example: 'Feeder'
databaseYesName of the database as registered in the configuration.
procedureYesStored procedure name, bare, with no schema prefix.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: it never executes procedures, and a procedure the login can see but not read returns definition null with definition_visible false — a non-obvious permission edge case.

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

Conciseness5/5

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

Three sentences, each earning its place: what it returns, when to use it, and the permission edge case. Front-loaded with the core purpose with zero filler.

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

Completeness5/5

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

No output schema exists, so the description carries the return-value burden and does so: it names the payload (CREATE PROCEDURE text) and the null/definition_visible failure shape. Combined with full param coverage and annotations, an agent has everything needed to call and interpret it.

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%, so the schema already documents schema, database, and procedure semantics including wildcard behavior for empty schema. The description adds no parameter-level detail beyond that, so the baseline 3 applies.

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?

States a specific verb and resource ('Returns the CREATE PROCEDURE text of one stored procedure'), scoping it to a single procedure and distinguishing it from the listing siblings. An agent can tell instantly that this reads source text, not metadata or execution results.

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

Usage Guidelines4/5

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

Explicitly routes the agent: use it to read or review a procedure found with list_procedures, and clarifies that this server never executes procedures. Clear context, though it does not name alternatives such as get_function_definition or state when-not to use it.

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