Skip to main content
Glama
SQL Query MCP Server

SQL Query MCP Server

by Tolosa527

get_table_relationships

Finds foreign key relationships between tables and shows which columns reference other tables, helping you understand how to join tables and write complex queries.

Instructions

Get foreign key relationships between tables. Shows which columns reference other tables, useful for understanding how to join tables and create complex queries.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_table_relationships"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure. It discloses the content of the response (columns and the tables they reference), but not the scope: with zero parameters it is unclear whether it covers the entire database or a caller-specified context, and there is no mention of differences across schemas, databases, or views.

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 tight sentences: the first states the resource and the return content, and the second explains the practical use. There is no filler, and the most important information comes first.

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?

This is a simple zero-parameter read tool with no output schema, and it does convey the conceptual shape of the result (foreign key columns and their referenced tables). The remaining gap is scope: an agent cannot tell from the definition whether the result spans the whole database or is limited in some way.

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?

The tool takes no parameters, so the baseline is 4. The description adds no parameter-related meaning because there is none to add, and it also does not explain what the absence of parameters implies (for example, that the whole database is scanned). That missing implication holds it just under the 0-param baseline of 4.

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 names a specific resource (foreign key relationships between tables) and clarifies exactly what is returned: "which columns reference other tables." That makes it clearly distinct from list_tables and execute_select_query, though it never explicitly names a sibling to contrast itself with, which is what a 5 would require.

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?

Usage is implied through the stated benefit ("useful for understanding how to join tables and create complex queries"), which tells an agent the general scenario. However, there is no explicit when-to-use versus when-to-use-instead guidance relative to get_database_schema or list_tables, so the agent must infer that this tool is for join planning rather than schema browsing.

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