Skip to main content

HG Data Warehouse Catalog

Coming soon

The v2 MCP API is in preview and not yet generally available. These pages document its tools and request/response shapes; live data access is limited to enrolled organizations until v2 is released.

Browse the HG Insights data warehouse SCHEMA (table/column names and types, join keys, indexing hints, sql_qualifier) to plan an hg_data_query — returns schema metadata, NOT data rows. This is the required first step before writing SQL. The schema is stable — call once per session and cache it.

TWO MODES: (1) ORIENTATION (default, table_names OMITTED): a lightweight index of ALL tables, each as {name, sql_qualifier, description} only — no columns, join keys, sample queries, or relationships. The cheap first call; use it to discover which tables exist, then drill in. (2) DETAIL (table_names SET): full metadata for the named tables (columns, order_by, primary_key, join_keys, common_filters, mandatory_predicate, sample_queries) plus the relationship edges touching them. The columns and include_sample_queries params apply in DETAIL mode only.

Use this when:

  • Discovering which tables and columns exist before writing SQL for hg_data_query.
  • Confirming a column's exact name, type, or join key, or a table's sql_qualifier, before referencing it.
  • Mapping table relationships to plan a multi-table join.

Do NOT use this when:

  • You want to RUN a query and get rows back — call hg_data_query (this tool returns schema only).
  • You need product/technology taxonomy VALUES (category, vendor, attribute, or product names/IDs) — call get_product_category, get_vendor_information, or get_product_attribute; those describe HG's product catalog, not warehouse table schemas.

Parameters

NameTypeRequiredDefaultDescription
table_namesarray❌ No-Exact table names from a prior orientation call (lowercase, underscores; e.g. ["install_global", "company_locations"]). Returns FULL detail for them (columns, join keys, sample queries) plus the relationship edges that touch any of them — an edge is included when EITHER endpoint is in the requested set, not only when both are. Omit for a lightweight ORIENTATION index of all tables ({name, sql_qualifier, description} only, empty relationships[]). An unknown name errors (422) and names the bad entries — call with no table_names first to see valid names.
columnsstring❌ NoimportantColumn verbosity. Applies only when table_names is set — an unscoped call always returns the compact orientation index (name/sql_qualifier/description only). none=strips column definitions AND projection/index blocks (projection_details, skip_indexes, indexed_filters); order_by/primary_key/mandatory_predicate kept. important=curated most-important columns with full indexing metadata (default). full=every column live from ClickHouse system.columns (many have no description).
include_sample_queriesboolean❌ NotrueInclude curated worked SQL examples per table. Applies only when table_names is set. Set false to reduce token usage.

Required Integrations

  • hginsights_v2__data_api

Use Cases

  • List every table in the HG data warehouse before deciding what to query
  • Get the exact columns and types on company_spend to build a SQL SELECT for hg_data_query
  • Confirm the join keys and grain of install_global before joining it to company_locations
  • Look up a cross-db table's sql_qualifier (e.g. products) to write a correct FROM clause
  • Discover the relationship edges around a table to plan a multi-table join

Example Usage

Orientation: list all tables (cheap first call)

{
"tool": "hg_catalog",
"arguments": {}
}

Full detail for one table with sample queries

{
"tool": "hg_catalog",
"arguments": {
"table_names": [
"company_spend"
]
}
}

Compact detail for a join: columns only, no sample queries

{
"tool": "hg_catalog",
"arguments": {
"table_names": [
"install_global",
"company_locations"
],
"columns": "none",
"include_sample_queries": false
}
}

hg_data_query, get_product_category, get_vendor_information, get_product_attribute