Skip to main content
Glama
igorolv

jdbc-mcp-server

findJoinPaths

findJoinPaths
Read-onlyIdempotent

Discover join paths connecting two known tables by traversing foreign keys and observed join edges, revealing unknown intermediate relationships.

Instructions

Find join paths when both endpoint tables are known but the intermediate relationships are not. Traverses declared FK and optional observed join edges in both directions; for one table's immediate neighborhood, use tableContext.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toTableYes
maxDepthNoMaximum FK hops. Default 4.
maxPathsNoMaximum paths to return. Default 5, max 25.
toSchemaNo
fromTableYes
scanLimitNoMaximum tables to scan (default 300).
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.
fromSchemaNo
includeObservedNoInclude usage-catalog equi-joins (default: catalog enabled).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsNoJoin paths from the source table to the target table; each path is an ordered list of steps.
toTableNo
maxDepthYesMaximum relationship traversal depth that was applied.
toSchemaNo
fromTableNo
pathCountYesNumber of join paths returned after caps were applied.
fromSchemaNo
includeObservedYesTrue when usage-catalog observed joins were included as relationship evidence.
schemaTablesScannedYesNumber of schema tables inspected while searching the relationship graph.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral detail beyond annotations: it traverses 'declared FK and optional observed join edges in both directions,' which clarifies the search mechanics and the includeObserved parameter intent.

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 with no filler. The purpose is front-loaded, the traversal behavior is summarized, and the sibling routing is delivered in a compact closing clause.

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

Completeness5/5

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

Given the tool has a rich output schema and annotations covering read-only, idempotent, and non-destructive behavior, the description provides the needed selection and invocation context without forcing the agent to infer usage. It explains when to use it, what it traverses, and how it differs from a key sibling.

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 description coverage is 56%, so several parameters (fromTable, toTable, fromSchema, toSchema) lack schema-level descriptions. The description compensates by framing these as 'endpoint tables' and clarifying the task involves unknown 'intermediate relationships,' which directly informs how to set fromTable and toTable. It does not elaborate schema parameters, but the core ambiguity is addressed.

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 names a specific action and resource: 'Find join paths when both endpoint tables are known but the intermediate relationships are not.' It clearly distinguishes the tool from tableContext by stating that the immediate neighborhood case belongs to that sibling, so an agent can tell them apart without inspecting schemas.

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

Usage Guidelines5/5

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

It states the precise condition to use the tool ('when both endpoint tables are known but the intermediate relationships are not') and explicitly points to the alternative ('for one table's immediate neighborhood, use tableContext'). This gives actionable selection guidance.

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