Skip to main content
Glama
cwilby

SQL Server MCP

by cwilby

get-stored-procedures

Retrieve a comprehensive list of all stored procedures in a Microsoft SQL Server database for efficient query and schema management.

Instructions

Get a list of all stored procedures in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the logic for the 'get-stored-procedures' tool. It queries INFORMATION_SCHEMA.ROUTINES for procedures and returns a formatted result.
    async getStoredProcedures() {
        const procedures = await database.query(`
            SELECT ROUTINE_NAME, ROUTINE_TYPE, ROUTINE_DEFINITION
            FROM INFORMATION_SCHEMA.ROUTINES
            WHERE ROUTINE_TYPE = 'PROCEDURE'
        `);
    
        if (!procedures.length) return this.toResult("No stored procedures found in the database.");
    
        return this.toResult(`Stored procedures found in the database:\n${JSON.stringify(procedures)}`);
    }
  • The exact registration of the 'get-stored-procedures' tool using server.tool(), binding the handler method.
    server.tool(
        "get-stored-procedures", 
        "Get a list of all stored procedures in the database", 
        tools.getStoredProcedures.bind(tools)
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'gets a list' but doesn't specify if this is a read-only operation, what permissions are required, if it's paginated or returns all at once, or any rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is a single, efficient sentence that front-loads the core purpose with no wasted words. It directly communicates what the tool does without unnecessary elaboration, making it easy to parse quickly.

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?

Given the tool has 0 parameters, no annotations, and no output schema, the description is minimally adequate. It states the action and resource but lacks details on behavior, output format, or integration with siblings. For a simple list operation, this might suffice, but it doesn't provide enough context for optimal agent use without additional inference.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description doesn't need to add parameter details, and it correctly implies no inputs are required. Baseline for 0 parameters is 4, as there's nothing to compensate for.

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 action ('Get a list') and resource ('all stored procedures in the database'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get-stored-procedure' (singular) or 'get-table'/'get-tables', but the scope is specific enough to infer it returns multiple procedures rather than details of one.

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 provides no guidance on when to use this tool versus alternatives. For example, it doesn't clarify if this is for metadata exploration, how it relates to 'get-stored-procedure' (singular), or if it should be used before querying. Without such context, the agent must infer usage from tool names alone.

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

Related 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/cwilby/mcp-node-mssql'

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