Skip to main content
Glama
PiyapatRag

MS SQL Server MCP Server

by PiyapatRag

mssql_get_schema

Read-onlyIdempotent

Retrieve database schema including tables, columns, data types, primary keys, and foreign keys. Optionally filter by table name for targeted results.

Instructions

Get database schema information including tables, columns, data types, primary keys, and foreign keys. Optionally filter by table name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNameNoOptional: specific table name to get schema for. If not provided, returns all tables.
response_formatNoResponse format: 'json' for machine-readable, 'markdown' for human-readable (default: markdown)markdown
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the agent knows this is a safe read-only operation. The description adds what data is returned but does not disclose additional behavioral traits (e.g., performance impact, system table queries). No contradiction with annotations.

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, well-structured sentence that front-loads the core purpose and then adds optional detail. Every word adds value, with no fluff or redundancy.

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

Completeness4/5

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

The description sufficiently covers the tool's functionality for a simple read-only schema retrieval tool. It mentions the key return components and optional filtering. However, it could be slightly more complete by noting that the output format can be specified (already in param schema) and that all tables are returned if no filter is given (already in param schema).

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 input schema has 100% description coverage for both parameters (tableName and response_format). The description adds context about the returned data (tables, columns, types, keys) that is not in the schema, enhancing understanding beyond the schema alone.

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 tool retrieves database schema information including tables, columns, data types, primary keys, and foreign keys, with optional table name filtering. This distinguishes it from sibling tools like mssql_get_relationships, mssql_get_views, etc.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives. While the purpose is clear, it lacks guidance like 'For relationships only, use mssql_get_relationships' or 'Use this for a full schema overview.' Usage is implied but not spelled out.

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

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