Skip to main content
Glama

get_fk_graph

Build a foreign-key relationship graph for a schema or table, returning child-to-parent edges and a Mermaid diagram.

Instructions

Build a foreign-key relationship graph for a schema or a single table. Returns directed edges (child→parent) and a Mermaid diagram string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNoOptional table name to scope the graph. Leave blank for the entire schema.
schemaNoSchema (owner) to inspect. Optional — defaults to the server's current schema; omit rather than guess.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.16.3

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. It usefully discloses the return content ('directed edges (child→parent) and a Mermaid diagram string'), which is real behavioral value since there is no output schema, but it never states that the operation is read-only, whether it hits the live database, or any cost/latency characteristics.

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 short sentences, front-loaded with the action and followed immediately by the return format. No filler or redundancy.

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?

With no annotations and no output schema, the description covers the essential missing piece by describing the returned edges and Mermaid string. It is largely sufficient for calling the tool, though it omits read-only assurance and any indication of graph size or depth limits.

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 both parameters are already documented, including the 'omit rather than guess' default for schema. The description's 'for a schema or a single table' merely restates that split and adds no syntax or format detail beyond the schema.

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 states a specific verb and resource ('Build a foreign-key relationship graph') plus its scope ('for a schema or a single table'), and it names the output shape. It does not, however, distinguish itself from close siblings such as get_dependency_graph or validate_fk_integrity, leaving the agent to infer the difference.

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?

Scope guidance is present ('a schema or a single table', 'leave blank for the entire schema'), which implies when the table parameter matters, but there is no explicit when-to-use or when-not-to-use guidance relative to get_dependency_graph or validate_fk_integrity.

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