Skip to main content
Glama
PuppyGraph MCP Server

PuppyGraph MCP Server

Official
by puppygraph

puppygraph_check_join

Check whether a column references another table: sample distinct values, count matches, and rank candidate key columns by hit rate.

Instructions

Check from the data whether a column references another table: samples distinct values of from.column and counts how many exist in to.column. Without to.column, tries the type-compatible columns of to.table and ranks them. Returns candidates with hit_rate (share of sampled values found), from_keys and to_keys (distinct counts), and up to 5 values that were not found (unless the server returns counts only). Check every edge this way before putting it in a schema; never present a join you did not check as verified. A hit_rate near 1.0 is a foreign key; below about 0.95 it is a soft reference, so tell the user the evidence. Independent checks can run in parallel. It can take minutes on large tables.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "puppygraph_check_join"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesThe referenced table and, if known, its key column, e.g. customers.id
fromYesThe referencing column, e.g. orders.customer_id
max_candidatesNoWithout to.column: how many candidate columns to return, default 5

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the sampling approach, the exact return payload (candidates, hit_rate, from_keys, to_keys, up to 5 unmatched values, with a caveat about counts-only servers), interpretation thresholds (near 1.0 = foreign key, below ~0.95 = soft reference), parallelism, and the cost warning that it can take minutes on large tables. These are precisely the behavioral traits an agent cannot get from structured fields here.

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?

Seven short sentences, each doing distinct work: capability, alternate mode, return shape, workflow mandate, interpretation thresholds, parallelism, cost. The core capability is front-loaded and there is no filler or repetition of schema content.

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?

There is no output schema and no annotations, so the description must document return values and operational risk, and it does both explicitly. For a nested-parameter verification tool whose results are statistical, the disclosed thresholds, sample-based caveat, and runtime warning cover what an agent needs before calling.

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 100%, so the baseline is 3, but the description adds genuine meaning the schema does not: it explains that omitting to.column triggers a ranked search over type-compatible columns of to.table, which reframes an optional field as a mode switch. max_candidates' effect is implied by that same ranking sentence, though the default is already in 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 first sentence states a precise verb and object: check whether a column references another table by sampling distinct values of from.column and counting matches in to.column. That is far more specific than a name restatement, and the fallback mode (rank type-compatible columns when to.column is absent) further pins the scope. It does not explicitly differentiate itself from the sibling puppygraph_check_edges, which is the only thing keeping it from a 5.

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?

Usage guidance is strong and conditional: 'Check every edge this way before putting it in a schema; never present a join you did not check as verified' tells the agent both the workflow position and the consequence of skipping it, and 'Without to.column...' explains the alternate mode. Independent checks running in parallel is useful operating guidance. It never names a competing tool or a case where this should not be used, so no explicit alternatives.

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