Skip to main content
Glama

suggest_refs

Read-only

Scan workspace tables to identify candidate foreign-key mappings where column values reference another table's key column. Presents ranked candidates for confirmation before broken-link validation with recon_diff.

Instructions

引用完整性候选发现:扫描当前工作区全部表,找出「A 表某列的值疑似引用 B 表某键列」的候选映射(值域包含推断,词面相似度仅排序)。候选不是结论——须向用户确认映射后,用 recon_diff 对确认的映射执行零容忍断链扫描。典型流程:suggest_refs 列候选 → 用户确认 → recon_diff 逐对检查(悬挂行即配置断链:关卡表配置的装备等级在装备等级表无对应条目)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNNo候选数上限(可选,1-100,缺省 20)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint already marks this as read-only, and the description adds valuable behavioral context: outputs are candidates, not conclusions; inference is based on domain containment; and lexical similarity is only used for ranking. It also warns that confirmed mappings still require recon_diff, which clarifies the tool's limitations.

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 packs purpose, workflow, caveats, and an illustrative example into one coherent paragraph. The key constraint that candidates are not conclusions is front-and-center, and every sentence contributes useful information, though the paragraph is somewhat dense.

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?

Given no output schema, the description adequately explains what the tool scans, how candidate discovery works, and what the follow-up step should be. It stops short of describing the exact output shape, but the workflow and boundary against recon_diff are sufficient for an agent to select and invoke the tool correctly.

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?

The only parameter topN is fully described in the input schema with a range and default, so schema coverage is 100%. The description adds no additional parameter-level semantics, which is acceptable given the schema already carries that burden.

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 opening phrase '引用完整性候选发现' names an explicit task, and the description specifies scanning all tables in the current workspace to find candidate mappings where a column in table A may reference a key column in table B. It also differentiates itself from recon_diff by framing outputs as unverified candidates rather than confirmed broken-link results.

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 workflow: use suggest_refs to generate candidates, get user confirmation, then use recon_diff for zero-tolerance broken-link checks. This gives concrete context for when to use the tool and how it relates to recon_diff, though it does not explicitly contrast it with other sibling discovery tools such as infer_foreign_keys.

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