Skip to main content
Glama
S-CurveLabs

io.github.S-CurveLabs/sqlglass

Official
by S-CurveLabs

find_join_path

Read-only

Find the shortest chain of declared foreign keys between two tables and get ready-to-use JOIN lines.

Instructions

How two tables relate: the shortest chain of declared foreign keys between them, as ready-to-use JOIN lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_tableYes
connectionNo
from_tableYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

The description discloses that only declared foreign keys are considered, that the result is the shortest chain, and that the output is ready-to-use JOIN lines. This adds behavioral meaning beyond the readOnlyHint annotation. It does not cover edge cases like missing relationships or multiple paths, but the core behavior is transparent.

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, tightly worded sentence that front-loads the core concept and then provides the key detail about foreign keys and JOIN output. Every phrase earns its place and there is no filler.

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 simple two-required-parameter tool with no output schema, the description covers the essential behavior: shortest FK chain and JOIN-line output. However, it omits the optional connection parameter, does not mention what happens when no join path exists, and provides only a high-level sense of the return format.

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

Parameters2/5

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

The schema has 0% description coverage, so the description must compensate. It references 'two tables' and 'between them,' which loosely maps to from_table and to_table, but it never explains the connection parameter or how the parameters interact. The names are somewhat self-explanatory, but the description leaves a key parameter undocumented.

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 that the tool finds the shortest chain of declared foreign keys between two tables and returns ready-to-use JOIN lines. This distinguishes it from query-building or schema-inspection siblings. It lacks a direct imperative verb, but the resource and output are specific enough for an agent to understand the tool's purpose.

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 implies a use case—understanding how two tables relate via foreign keys—but gives no explicit guidance on when to choose this tool over siblings like describe_table, build_select, or find_usage. There are no exclusions, prerequisites, or alternative tool recommendations.

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