Skip to main content
Glama
sql-lens-mcp

sql-lens-mcp

by varkart

describe_relationships

Identifies foreign-key relationships between database tables to support join planning and schema exploration.

Instructions

Describe foreign-key relationships between tables for join planning

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connectionId": "<connectionId>"
    },
    "name": "describe_relationships"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoOutput format
schemaNoSchema name to filter by
connectionIdYesConnection ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.5/5.0
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. It conveys that this is a read-style description operation producing relationship metadata, but does not state connection requirements, behavior when no foreign keys exist, or the shape of the result. It is minimally adequate rather than rich.

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?

A single front-loaded sentence with a clear verb, resource, and purpose. Nothing is redundant or misleading.

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?

For a three-parameter read tool with no output schema, the description identifies the subject matter but does not explain the returned structure or how filtering and formatting work. The schema covers the parameters, but the description leaves the agent to infer the output and edge-case behavior.

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 input schema already documents connectionId, schema, and format. The description adds no meaning about how the schema filter or output format affect the relationship results, so baseline 3 applies.

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 gives a specific verb and resource ('Describe foreign-key relationships between tables') plus the purpose ('for join planning'). It does not explicitly distinguish itself from the sibling describe_schema, leaving the boundary between schema description and relationship description implicit.

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 phrase 'for join planning' implies when the tool is useful, but there is no explicit guidance on when to use this instead of describe_schema or when it is unnecessary. No prerequisites or exclusions are stated.

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