Skip to main content
Glama
thhart

database-mcp

by thhart

join_path

Find the shortest foreign-key path between two tables and get a ready-to-use JOIN chain, eliminating guesswork on unfamiliar schemas.

Instructions

Shortest foreign-key path between two tables, rendered as a ready-to-use JOIN chain (up to 3 equally short paths). Use this instead of guessing joins on unfamiliar schemas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNo
max_hopsNo
to_tableYes
from_tableYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must carry the burden of behavioral disclosure. It mentions output characteristics (up to 3 equally short paths, ready-to-use chain) but does not state whether the operation is read-only, whether it requires specific permissions, or how errors are handled (e.g., no path found). This is a significant gap for a tool with no annotation safety net.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with two sentences front-loading the primary purpose. The guidance sentence is useful, though slightly vague. It is efficient and wastes no words, but it could be more structured by separating purpose and usage.

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

Completeness2/5

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

Despite having an output schema, the description leaves key aspects unexplained: the meaning of 'profile' and 'max_hops', and the behavior when no path exists. For a tool with four parameters and no annotations, the description is incomplete and would force an agent to infer critical details.

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?

Schema description coverage is 0%, and the description only implicitly explains the two required parameters (from_table, to_table) through 'between two tables.' It completely omits the semantics of 'profile' and 'max_hops', which are not documented elsewhere. The description adds minimal value beyond what the schema names.

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 tool's function: finding the shortest foreign-key path between two tables and rendering it as a ready-to-use JOIN chain. It distinguishes the tool from ad-hoc guessing but does not explicitly name sibling tools like 'relations' or 'describe', so it falls slightly short of full differentiation.

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

Usage Guidelines4/5

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

The description provides a clear usage context: 'Use this instead of guessing joins on unfamiliar schemas.' It implies the tool is for unfamiliar schemas and suggests it replaces manual guessing, but it does not explicitly list alternatives or exclusions, so it lacks the full 'when-not-to-use' guidance for a 5.

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/thhart/database-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server