Files
zeekay bc4ddf332b chore: rebase the tree onto upstream master fa1a9a60
Mechanically re-derived: bin/debrand runs over a fresh import of
posthog/posthog@fa1a9a60d4 (2026-08-06).
The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker*
entrypoints, compose files, LLM.md and the squashed initial migration
are restored from the shipped tree, same as the previous import.

The prune's import-closure guard kept 21 products the new core now
imports; dropping them is a refactor now, recorded rather than forced.
2026-08-06 01:25:36 -07:00

622 lines
26 KiB
YAML

# MCP tool definition — tool entries are scaffolded from the OpenAPI schema.
# The tool list and operation IDs are kept in sync automatically:
# pnpm --filter=@hanzo/mcp run scaffold-yaml -- --sync-all
#
# To enable a tool, set enabled: true and add required scopes + annotations.
# All other fields (title, description, enrich_url, etc.) are yours to configure.
category: Data warehouse
feature: data_warehouse
url_prefix: /sql
ui_apps: {}
tools:
data-modeling-jobs-list:
operation: data_modeling_jobs_list
enabled: false
data-modeling-jobs-recent-retrieve:
operation: data_modeling_jobs_recent_retrieve
enabled: false
data-modeling-jobs-retrieve:
operation: data_modeling_jobs_retrieve
enabled: false
data-modeling-jobs-running-retrieve:
operation: data_modeling_jobs_running_retrieve
enabled: false
data-warehouse-check-database-name-retrieve:
operation: data_warehouse_check_database_name_retrieve
enabled: false
data-warehouse-check-schema-name-retrieve:
operation: data_warehouse_check_schema_name_retrieve
enabled: false
data-warehouse-completed-activity-retrieve:
operation: data_warehouse_completed_activity_retrieve
enabled: false
data-warehouse-data-health-issues-retrieve:
operation: data_warehouse_data_health_issues_retrieve
enabled: false
data-warehouse-data-ops-dashboard-retrieve:
operation: data_warehouse_data_ops_dashboard_retrieve
enabled: false
data-warehouse-delete-org-destroy:
operation: data_warehouse_delete_org_destroy
enabled: false
data-warehouse-deprovision-create:
operation: data_warehouse_deprovision_create
enabled: false
data-warehouse-job-stats-retrieve:
operation: data_warehouse_job_stats_retrieve
enabled: false
data-warehouse-managed-warehouse-data-status-retrieve:
operation: data_warehouse_managed_warehouse_data_status_retrieve
enabled: false
data-warehouse-managed-warehouse-source-schemas-retrieve:
operation: data_warehouse_managed_warehouse_source_schemas_retrieve
enabled: false
data-warehouse-onboard-team-create:
operation: data_warehouse_onboard_team_create
enabled: false
data-warehouse-property-values-retrieve:
operation: data_warehouse_property_values_retrieve
enabled: false
data-warehouse-provision-create:
operation: data_warehouse_provision_create
enabled: false
data-warehouse-reset-password-create:
operation: data_warehouse_reset_password_create
enabled: false
data-warehouse-running-activity-retrieve:
operation: data_warehouse_running_activity_retrieve
enabled: false
data-warehouse-total-rows-stats-retrieve:
operation: data_warehouse_total_rows_stats_retrieve
enabled: false
data-warehouse-warehouse-status-retrieve:
operation: data_warehouse_warehouse_status_retrieve
enabled: false
fix-insightsql-create:
operation: fix_insightsql_create
enabled: false
fix-insightsql-destroy:
operation: fix_insightsql_destroy
enabled: false
fix-insightsql-list:
operation: fix_insightsql_list
enabled: false
fix-insightsql-partial-update:
operation: fix_insightsql_partial_update
enabled: false
fix-insightsql-retrieve:
operation: fix_insightsql_retrieve
enabled: false
fix-insightsql-update:
operation: fix_insightsql_update
enabled: false
insight-variables-list:
operation: insight_variables_list
enabled: false
insight-variables-retrieve:
operation: insight_variables_retrieve
enabled: false
insight-variables-update:
operation: insight_variables_update
enabled: false
managed-viewsets-retrieve:
operation: managed_viewsets_retrieve
enabled: false
managed-viewsets-update:
operation: managed_viewsets_update
enabled: false
query-tab-state-create:
operation: query_tab_state_create
enabled: false
query-tab-state-destroy:
operation: query_tab_state_destroy
enabled: false
query-tab-state-list:
operation: query_tab_state_list
enabled: false
query-tab-state-partial-update:
operation: query_tab_state_partial_update
enabled: false
query-tab-state-retrieve:
operation: query_tab_state_retrieve
enabled: false
query-tab-state-update:
operation: query_tab_state_update
enabled: false
query-tab-state-user-retrieve:
operation: query_tab_state_user_retrieve
enabled: false
saved-query-column-annotations-create:
operation: saved_query_column_annotations_create
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: false
idempotent: true
title: Add a view column description
description: >
Add or replace a semantic description for a data-modelling view (saved query) or one of its columns. Use
this ONLY for views — rows where table_type = 'view' in system.information_schema.tables. For
imported/physical warehouse tables (table_type = 'data_warehouse') use warehouse-column-annotations-create
instead. Core Insights tables (events, persons, groups, sessions; table_type = 'insights') cannot be
described. Provide the saved_query id, the column_name (empty string for a view-level description), and the
description. The annotation is recorded as user-edited, which prevents automatic enrichment from overwriting
it. Calling this again for the same column replaces the existing description.
param_overrides:
column_name:
description: Column to describe. Use an empty string to describe the view itself.
saved-query-column-annotations-destroy:
operation: saved_query_column_annotations_destroy
enabled: false
saved-query-column-annotations-list:
operation: saved_query_column_annotations_list
enabled: true
scopes:
- warehouse_view:read
annotations:
readOnly: true
destructive: false
idempotent: true
list: true
title: List view column descriptions
description: >
List semantic descriptions of data-modelling views (saved queries) and their columns. Use this for views
(table_type = 'view' in system.information_schema.tables); for physical warehouse tables use
warehouse-column-annotations-list. Pass ?saved_query_id=<uuid> to scope to one view. Each entry has the
column_name (empty string = view-level description), the description, and its source (ai_generated or
user_edited). Use this to see what a view's columns mean before writing SQL against it.
saved-query-column-annotations-partial-update:
operation: saved_query_column_annotations_partial_update
enabled: false
saved-query-column-annotations-retrieve:
operation: saved_query_column_annotations_retrieve
enabled: false
saved-query-column-annotations-update:
operation: saved_query_column_annotations_update
enabled: false
sql-variables-create:
operation: insight_variables_create
enabled: true
scopes:
- insight_variable:write
annotations:
readOnly: false
destructive: false
idempotent: false
title: Create SQL variable
description: >
Create a reusable SQL variable for InsightsQL queries. Provide a human-readable name and type. The code_name is
generated from the name and is referenced in SQL as {variables.code_name}. For List variables, provide
values as the allowed options.
sql-variables-delete:
operation: insight_variables_destroy
enabled: true
scopes:
- insight_variable:write
annotations:
readOnly: false
destructive: true
idempotent: true
title: Delete SQL variable
description: >
Delete a SQL variable by ID. Queries that reference this variable by code_name may stop working after
deletion.
sql-variables-update:
operation: insight_variables_partial_update
enabled: true
scopes:
- insight_variable:write
annotations:
readOnly: false
destructive: false
idempotent: true
title: Update SQL variable
description: >
Update an existing SQL variable by ID. You can change the name, type, default_value, or allowed values for
List variables. If the name changes, check the response for the current code_name before writing queries
that reference it.
view-create:
operation: warehouse_saved_queries_create
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: false
idempotent: false
enrich_url: ?open_view={id}
title: Create saved query
description: >
Create a new data warehouse saved query (view). If a view with the same name already exists, it will be
updated instead (upsert behavior). The query must be valid InsightsQL. After creation, the view can be referenced
by name in other InsightsQL queries. Set `description` to record what the view represents (a semantic description
surfaced to agents); per-column descriptions are set via the saved-query column annotation tools.
exclude_params:
- deleted
- edited_history_id
- soft_update
- is_materialized
- origin
- status
- latest_error
- created_by
- created_at
- columns
- last_run_at
- managed_viewset_kind
- sync_frequency_managed_by_dag
- latest_history_id
param_overrides:
name:
description:
Unique name for the view. Used as the table name in InsightsQL queries. Must not conflict with existing table
names.
view-delete:
operation: warehouse_saved_queries_destroy
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: true
idempotent: false
title: Delete saved query
description: >
Delete a data warehouse saved query (view) by ID. This is a soft delete — the view is marked as deleted and
will no longer appear in lists or be queryable in InsightsQL. Any materialization schedule is also removed.
Cannot delete views that have downstream dependencies or views from managed viewsets.
soft_delete: true
view-get:
operation: warehouse_saved_queries_retrieve
enabled: true
scopes:
- warehouse_view:read
annotations:
readOnly: true
destructive: false
idempotent: true
enrich_url: ?open_view={id}
title: Get saved query
description: >
Get a specific data warehouse saved query (view) by ID. Returns the full view definition including the InsightsQL
query, column schema, materialization status, sync frequency, and run history metadata. Also returns the
view's semantic `description` and a `description` on each entry of `columns` when set — use this to see what
a view and its columns mean.
view-list:
operation: warehouse_saved_queries_list
enabled: true
scopes:
- warehouse_view:read
annotations:
readOnly: true
destructive: false
idempotent: true
enrich_url: ?open_view={id}
list: true
title: List saved queries
description: >
List all data warehouse saved queries (views) in the project. Returns each view's name, materialization
status, sync frequency, column schema, latest error, and last run timestamp. Each view also includes its
semantic `description` and a `description` on each entry of `columns` when set. Use this to discover
available views and what they mean before querying them in InsightsQL.
view-materialize:
operation: warehouse_saved_queries_materialize_create
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: false
idempotent: true
enrich_url: ?open_view={params.id}
title: Materialize saved query
description: >
Enable materialization for a saved query. This creates a physical table from the view's query and sets up a
sync schedule to keep it refreshed, daily unless `sync_frequency` asks for another cadence. A cadence is
rejected when the view's lineage cannot support it: no more often than its sources deliver new data, and no
less often than a downstream view or endpoint needs. Materialized views are faster to query but use storage.
Use 'view-unmaterialize' to undo. Rate limited.
view-run:
operation: warehouse_saved_queries_run_create
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: false
idempotent: true
enrich_url: ?open_view={id}
title: Run saved query
description: >
Trigger a manual materialization run for a saved query. This immediately refreshes the materialized table
with the latest data. The view must already be materialized. Use 'view-run-history' to check run status.
view-run-history:
operation: warehouse_saved_queries_run_history_retrieve
enabled: true
scopes:
- warehouse_view:read
annotations:
readOnly: true
destructive: false
idempotent: true
enrich_url: ?open_view={id}
title: Get run history
description: >
Get the 5 most recent materialization run statuses for a saved query. Each entry includes the run status and
timestamp. Use this to monitor whether materialization is running successfully.
view-unmaterialize:
operation: warehouse_saved_queries_revert_materialization_create
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: false
idempotent: true
enrich_url: ?open_view={id}
title: Revert materialization
description: >
Undo materialization for a saved query. Deletes the materialized table and removes the sync schedule,
reverting the view back to a virtual query that runs on each access. The view definition itself is
preserved. Rate limited.
view-update:
operation: warehouse_saved_queries_partial_update
enabled: true
scopes:
- warehouse_view:write
annotations:
readOnly: false
destructive: false
idempotent: true
enrich_url: ?open_view={id}
title: Update saved query
description: >
Update an existing data warehouse saved query (view). Can change the name, InsightsQL query, sync frequency, or
`description`. To set what the view represents (the semantic description surfaced to agents), pass
`description` — an empty string clears it; per-column descriptions are set via the saved-query column
annotation tools. Changing the query triggers column re-inference and sets the status to 'modified'. Use
sync_frequency to control materialization schedule: '15min' (the fastest cadence), '30min', '1hour',
'6hour', '12hour', '24hour', '7day', '30day', or 'never' to pause scheduled materialization. IMPORTANT: when
updating the query field, you must first retrieve the view to get its latest_history_id, then pass that
value as edited_history_id for conflict detection.
exclude_params:
- deleted
- soft_update
- is_materialized
- origin
- status
- latest_error
- created_by
- created_at
- columns
- last_run_at
- managed_viewset_kind
- sync_frequency_managed_by_dag
- latest_history_id
param_overrides:
name:
description:
Unique name for the view. Used as the table name in InsightsQL queries. Must not conflict with existing table
names.
edited_history_id:
description:
Required when updating the query field. Get this from latest_history_id on the retrieve response. Used for
optimistic concurrency control.
warehouse-column-annotations-create:
operation: warehouse_column_annotations_create
enabled: true
scopes:
- external_data_source:write
annotations:
readOnly: false
destructive: false
idempotent: false
title: Add a warehouse column description
description: >
Add a semantic description for a data warehouse table or column. Provide the table id, the column_name
(empty string for a table-level description), and the description. The new annotation is recorded as
user-edited, which prevents automatic enrichment from overwriting it.
param_overrides:
column_name:
description: Column to describe. Use an empty string to describe the table itself.
warehouse-column-annotations-destroy:
operation: warehouse_column_annotations_destroy
enabled: false
warehouse-column-annotations-list:
operation: warehouse_column_annotations_list
enabled: true
scopes:
- external_data_source:read
annotations:
readOnly: true
destructive: false
idempotent: true
list: true
title: List warehouse column descriptions
description: >
List semantic descriptions of data warehouse tables and columns. Pass ?table_id=<uuid> to scope to one
table. Each entry has the column_name (empty string = table-level description), the description, and its
source (canonical from the source's API documentation, ai_generated, or user_edited). Use this to see what
the imported data means before writing SQL against it.
warehouse-column-annotations-partial-update:
operation: warehouse_column_annotations_partial_update
enabled: true
scopes:
- external_data_source:write
annotations:
readOnly: false
destructive: false
idempotent: true
title: Edit a warehouse column description
description: >
Update the description of an existing warehouse table or column annotation by its id. The annotation is
marked user-edited, so automatic enrichment will no longer overwrite it.
warehouse-column-annotations-retrieve:
operation: warehouse_column_annotations_retrieve
enabled: false
warehouse-column-annotations-update:
operation: warehouse_column_annotations_update
enabled: false
warehouse-column-statistics-list:
operation: warehouse_column_statistics_list
enabled: false
warehouse-column-statistics-retrieve:
operation: warehouse_column_statistics_retrieve
enabled: false
warehouse-dag-list:
operation: warehouse_dag_list
enabled: false
warehouse-model-paths-list:
operation: warehouse_model_paths_list
enabled: false
warehouse-model-paths-retrieve:
operation: warehouse_model_paths_retrieve
enabled: false
warehouse-saved-queries-activity-retrieve:
operation: warehouse_saved_queries_activity_retrieve
enabled: false
warehouse-saved-queries-ancestors-create:
operation: warehouse_saved_queries_ancestors_create
enabled: false
warehouse-saved-queries-cancel-create:
operation: warehouse_saved_queries_cancel_create
enabled: false
warehouse-saved-queries-dependencies-retrieve:
operation: warehouse_saved_queries_dependencies_retrieve
enabled: false
warehouse-saved-queries-descendants-create:
operation: warehouse_saved_queries_descendants_create
enabled: false
warehouse-saved-queries-resume-create:
operation: warehouse_saved_queries_resume_create
enabled: false
warehouse-saved-queries-resume-schedules-create:
operation: warehouse_saved_queries_resume_schedules_create
enabled: false
warehouse-saved-queries-update:
operation: warehouse_saved_queries_update
enabled: false
warehouse-saved-query-drafts-create:
operation: warehouse_saved_query_drafts_create
enabled: false
warehouse-saved-query-drafts-destroy:
operation: warehouse_saved_query_drafts_destroy
enabled: false
warehouse-saved-query-drafts-list:
operation: warehouse_saved_query_drafts_list
enabled: false
warehouse-saved-query-drafts-partial-update:
operation: warehouse_saved_query_drafts_partial_update
enabled: false
warehouse-saved-query-drafts-retrieve:
operation: warehouse_saved_query_drafts_retrieve
enabled: false
warehouse-saved-query-drafts-update:
operation: warehouse_saved_query_drafts_update
enabled: false
warehouse-saved-query-folders-create:
operation: warehouse_saved_query_folders_create
enabled: false
warehouse-saved-query-folders-destroy:
operation: warehouse_saved_query_folders_destroy
enabled: false
warehouse-saved-query-folders-list:
operation: warehouse_saved_query_folders_list
enabled: false
warehouse-saved-query-folders-partial-update:
operation: warehouse_saved_query_folders_partial_update
enabled: false
warehouse-saved-query-folders-retrieve:
operation: warehouse_saved_query_folders_retrieve
enabled: false
warehouse-tables-create:
operation: warehouse_tables_create
enabled: false
warehouse-tables-create-from-upload-create:
operation: warehouse_tables_create_from_upload_create
enabled: false
warehouse-tables-destroy:
operation: warehouse_tables_destroy
enabled: false
warehouse-tables-file-create:
operation: warehouse_tables_file_create
enabled: false
warehouse-tables-list:
operation: warehouse_tables_list
enabled: false
warehouse-tables-partial-update:
operation: warehouse_tables_partial_update
enabled: false
warehouse-tables-refresh-schema-create:
operation: warehouse_tables_refresh_schema_create
enabled: true
scopes:
- warehouse_table:write
annotations:
readOnly: false
destructive: false
idempotent: true
title: Refresh table schema from source
description: >
Re-introspect a self-managed (manually linked) data warehouse table's schema from its underlying source
files and overwrite its stored column list. Use this when the source schema has evolved (e.g. new columns
added to the underlying Delta/Parquet/CSV files) but InsightsQL queries still fail to resolve the new columns —
Insights serves a cached column snapshot until the table is refreshed. Does not apply to tables managed by an
external data source sync (those refresh on their own schedule); for those, trigger a sync instead.
warehouse-tables-retrieve:
operation: warehouse_tables_retrieve
enabled: false
warehouse-tables-update:
operation: warehouse_tables_update
enabled: false
warehouse-tables-update-schema-create:
operation: warehouse_tables_update_schema_create
enabled: false
warehouse-tables-upload-file-create:
operation: warehouse_tables_upload_file_create
enabled: false
warehouse-view-link-create:
operation: warehouse_view_link_create
enabled: false
warehouse-view-link-destroy:
operation: warehouse_view_link_destroy
enabled: false
warehouse-view-link-list:
operation: warehouse_view_link_list
enabled: false
warehouse-view-link-partial-update:
operation: warehouse_view_link_partial_update
enabled: false
warehouse-view-link-retrieve:
operation: warehouse_view_link_retrieve
enabled: false
warehouse-view-link-update:
operation: warehouse_view_link_update
enabled: false
warehouse-view-link-validate-create:
operation: warehouse_view_link_validate_create
enabled: false
warehouse-view-links-create:
operation: warehouse_view_links_create
enabled: false
warehouse-view-links-destroy:
operation: warehouse_view_links_destroy
enabled: false
warehouse-view-links-list:
operation: warehouse_view_links_list
enabled: false
warehouse-view-links-partial-update:
operation: warehouse_view_links_partial_update
enabled: false
warehouse-view-links-retrieve:
operation: warehouse_view_links_retrieve
enabled: false
warehouse-view-links-update:
operation: warehouse_view_links_update
enabled: false
warehouse-view-links-validate-create:
operation: warehouse_view_links_validate_create
enabled: false