Skip to main content
Glama

infer_relationships

Infer missing table relationships by matching column names and types, verifying unique keys and data coverage. Propose or auto-create confident many-to-one matches.

Instructions

Auto-detect missing relationships from the DATA, not just names: finds columns matching by name + type across tables, then proves each one - which side is the unique key (cardinality + direction) and what fraction of the many-side keys exist on the one side (coverage). Returns ranked proposals with confidence; with autoCreate:true it creates the high-confidence many-to-one matches (as inactive if an active path already exists). Run this instead of guessing add_relationship calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
autoCreateNocreate the high-confidence many-to-one matches automatically (default false = propose only)
minCoverageNomin fraction of many-side keys that must exist on the one side to be 'high' confidence (default 0.9)
Behavior5/5

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

With no annotations provided, the description carries the full burden and succeeds. It reveals the algorithm (data-driven matching, cardinality/direction analysis, coverage computation), the output behavior (ranked proposals), and the effect of autoCreate (creates high-confidence matches as inactive if an active path exists). This is rich, honest behavioral disclosure.

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 dense and well-structured, with each clause adding value. It front-loads the core purpose and then adds actionable details about algorithm and options. No filler or redundant phrasing.

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?

Despite having no output schema and only minimal annotations, the description covers the essential context: what the tool does, how it works, what it returns, and the effect of the optional autoCreate flag. It is sufficient for an agent to understand the tool's role and potential side effects in a complex model-editing environment.

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 coverage is 67% (autoCreate and minCoverage have descriptions, sessionId lacks one). The description adds context beyond the schema by explaining the coverage concept and how autoCreate uses high-confidence matches, helping agents understand minCoverage and autoCreate semantics. sessionId remains standard, but the added context for the other parameters justifies a 4.

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 clearly states what the tool does: auto-detect missing relationships from actual data, not just names. It specifies the process (matching columns by name+type, proving key direction and coverage) and the output (ranked proposals with confidence). It also distinguishes itself from the sibling add_relationship tool by stating 'Run this instead of guessing add_relationship calls'.

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?

Explicitly recommends using this tool over manually guessing add_relationship calls, providing a clear alternative and context. It also explains when autoCreate is beneficial and how high-confidence matches are handled, giving agents a strong sense of when to invoke it.

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/cyphonica/powerbi-pbix-mcp'

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