DiscoveryFree tier

relationships_graph

Curated relationship graph between tables. Returns FK-style edges plus georeferences_via hints — semantic, hand-curated by the data team, not raw pg_constraint. The agent uses this to plan multi-source joins safely.

Use cases

  • Plan a JOIN: find the shared key between an aggregate ISTAT table and the census-section polygons that georeference it.
  • Build a query graph showing every table reachable from a given starting source.
  • Validate that a join you're about to attempt has a curated relationship (vs. a heuristic guess).

Arguments

NameTypeRequiredDescription
from_schema string optional Filter edges to those originating from a specific schema (e.g., realestate).

Example request

curl
bash
curl -X POST https://mcp.qubitdata.it/mcp \
  -H "Authorization: Bearer $QUBITDATA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "relationships_graph",
      "arguments": {
            "from_schema": "socioeconomic"
      }
    }
  }'

Example response

JSON-RPC 2.0 result
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "[\n  { \"from\": \"socioeconomic.istat_pop_residente\", \"to\": \"census_geom.istat_basi_territoriali\", \"via\": \"sez2021\", \"kind\": \"georeferences_via\" },\n  { \"from\": \"socioeconomic.istat_pop_residente\", \"to\": \"census_geom.istat_comuni\", \"via\": \"pro_com\", \"kind\": \"rolls_up_to\" }\n]"
      }
    ]
  }
}

Prompts to try

Drop these into Claude Desktop, Cursor, or any MCP-aware client wired to https://mcp.qubitdata.it/mcp.

  • Claude Desktop
    How can I join socioeconomic ISTAT data to a polygon layer? Show the curated relationships.
  • Cursor
    Use relationships_graph to find every table that georeferences via a census section.
  • Custom MCP client
    List every relationship out of the realestate schema.

Related tools

list_sources · describe_table

Get started

Sign up for a free key to call this tool from your agent. Need a wider geo cap or higher quota? See pricing.

Last updated: