Skip to main content
Glama

check_references

Read-only

Detect orphaned references by listing values that point to missing rows in referenced datasets, checking declared and inferred foreign-key links.

Instructions

Find orphans: values that point at rows missing from the referenced dataset, such as orders whose customer does not exist.

Without column and references, checks every foreign key the database declares, plus links guessed from column names across loaded datasets (orders.customer_id -> customers.id).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataset": "<dataset>"
    },
    "name": "check_references"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoOrphan row numbers to list.
columnNoColumn in this dataset that points at another dataset, such as 'customer_id'.
datasetYesA dataset name returned by load_dataset.
referencesNoWhat it points at, as 'dataset.column', such as 'customers.id'. Pass with column.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral content beyond that: the default no-parameter mode scans every declared foreign key plus heuristically guessed links from column names (orders.customer_id -> customers.id). It does not discuss cost or scan scope on large datasets, which keeps it from a 5.

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?

Front-loaded with the definition, then the default-mode behavior. No filler sentences, but the leading 'Find orphans' label with the second paragraph as a fragment reads slightly clipped and could be tightened into one flowing statement.

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?

An output schema exists so return values need not be explained, and annotations cover safety. Still, for a tool with a heuristic guessing path, the description leaves open how guessed links are distinguished from declared FKs in the results and whether guesses can produce false positives — relevant context an agent would want.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline is 3, but the description genuinely adds meaning the schema does not: it explains the semantics of omitting column and references entirely (fall back to all declared FKs plus name-guessed links). That is the key behavioral fork for this parameter set, and the description supplies it.

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?

States a specific verb and concept ('Find orphans') and immediately defines it concretely: 'values that point at rows missing from the referenced dataset, such as orders whose customer does not exist.' That is enough to separate it from siblings like check_missing or check_keys conceptually, though no sibling is named.

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?

The second paragraph implies two usage modes (targeted check with column/references vs. full sweep), which lets an agent infer when to supply parameters. However, there is no explicit statement of when to prefer this tool over check_keys or check_missing, nor any exclusions or prerequisites.

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