Skip to main content
Glama
dkp5897

SQL Server MCP Server

by dkp5897

sql_check_foreign_keys

Check for foreign key violations and orphaned records in SQL Server tables. Identify rows referencing non-existent parent rows to diagnose referential integrity issues.

Instructions

Find foreign key violations in a table — records that reference non-existent parent rows (orphaned data). Very useful for diagnosing referential integrity issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNoSpecific table to check. If omitted, checks ALL tables.
Behavior3/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 correctly indicates this is a read-only diagnostic operation by context ('find violations'), and it explains the conceptual behavior (checks for orphaned records). However, it does not describe what happens when all checks pass (empty result vs. a summary message), whether it reports a count or full row listings, or performance implications of checking ALL tables when table is omitted.

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?

Two sentences, zero wasted words. The first sentence states the action and the parenthetical explains the concept; the second sentence reinforces the diagnostic value case. Perfectly sized for a single-parameter tool.

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?

For a single-parameter read-only diagnostic tool with 100% schema coverage, the description is largely complete. It explains what it checks, what the concept means, and adds an example of its practical use. The only minor gap is absence of detail about the output format behavior when no violations exist, but there is no output schema and this is a fairly self-evident diagnostic.

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?

Schema coverage is 100% and there is only one parameter (table). The description adds meaningful context by explaining that omitting the table checks ALL tables, which supplements the schema. This is a simple tool where the single parameter's semantic meaning is fully conveyed by the schema plus the 'checks ALL tables' clarification.

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 (find) and resource (foreign key violations in a table), and even elaborates with a parenthetical explanation of what that means (records referencing non-existent parent rows, orphaned data). It distinguishes itself from siblings like sql_check_nulls by focusing specifically on referential integrity. However, it doesn't explicitly name any sibling alternatives, so it stops short of a 5.

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 implies when this tool is useful ('diagnosing referential integrity issues') but does not provide explicit when-to-use vs. when-not-to-use guidance, nor does it name any alternative sibling tools. The guidance is clear on the general use case but lacks exclusions or comparisons with overlapping tools like sql_diagnose_issue or sql_inspect_table.

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