Files
zeekay 1b367e2b62 chore: rebase the tree onto upstream master
The tree was a debranded snapshot of upstream taken around 2026-02-20, and
upstream has moved about five months since. This replaces it with upstream
master, mechanically re-derived: bin/debrand does the rename, and the
pipeline and squashed migrations are restored from the shipped tree.

Not a merge. The previous import replaced the tree wholesale in a single
commit, so there is no shared content history to merge against. Reproducing
the rename on the new tree is what actually converges.

What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints,
compose files, LLM.md, and insights/migrations. The squashed initial
migration is load-bearing — the live database records it by name, so
upstream's ~918 individual migrations cannot come back.

Nine products are dropped as unreferenced. Twenty-one more that we do not run
are kept anyway because the core app still imports them; unpicking those is a
refactor and does not belong in a rebase.

This base does not build yet, and the reasons are not in the rename:
upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against
our 4.2, and the dependency manifests still name upstream packages that we
republish under our own names. Those are decisions, not renames.
2026-08-01 15:44:40 -07:00

376 lines
14 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: Product analytics
feature: product_analytics
url_prefix: /insights
ui_apps:
insight-actors:
type: detail
view_prop: data
link_prop: openLink
tools:
column-configurations-create:
operation: column_configurations_create
enabled: false
column-configurations-destroy:
operation: column_configurations_destroy
enabled: false
column-configurations-list:
operation: column_configurations_list
enabled: false
column-configurations-partial-update:
operation: column_configurations_partial_update
enabled: false
column-configurations-retrieve:
operation: column_configurations_retrieve
enabled: false
column-configurations-update:
operation: column_configurations_update
enabled: false
elements-create:
operation: elements_create
enabled: false
elements-destroy:
operation: elements_destroy
enabled: false
elements-list:
operation: elements_list
enabled: false
elements-partial-update:
operation: elements_partial_update
enabled: false
elements-retrieve:
operation: elements_retrieve
enabled: false
elements-stats-retrieve:
operation: elements_stats_retrieve
enabled: true
scopes:
- element:read
annotations:
readOnly: true
destructive: false
idempotent: true
title: Get element click stats
description: >
Counts of autocapture clicks, rage clicks, and dead clicks grouped by page element, ordered by count. Each
result carries the parsed element chain (tag, text, href, attributes) of the clicked element. Filter by date
range, event types, URL or other event/person properties, and the project's internal-test-account filters.
This powers heatmap/clickmap views; use it to answer "what do users click most" and "which elements get rage
or dead clicks". Responses can be very large on busy projects — always pass a small `limit` (e.g. 100) and
paginate with `offset` if you need more results.
elements-update:
operation: elements_update
enabled: false
elements-values-list:
operation: elements_values_list
enabled: false
insight-create:
operation: insights_create
enabled: true
scopes:
- insight:write
annotations:
readOnly: false
destructive: false
idempotent: false
enrich_url: '{short_id}'
title: Create insight
description: >
Create a new saved insight from a name and query definition. Test queries with query-trends / query-funnel /
query-retention / query-paths / query-stickiness / query-lifecycle first to confirm the shape, then save.
Returns insight metadata only — after creating, call the insight-query tool with the returned `short_id` if
you want to see the computed results.
exclude_params:
- query
include_params:
- name
- description
- tags
- favorited
- dashboards
param_overrides:
query:
schema_ref: InsightQuery
dashboards:
description: >
Dashboard IDs this insight should belong to. This is a full replacement — always include all
existing dashboard IDs when adding a new one.
description:
description: |
Human-readable summary of what the insight shows. Max 400 characters (longer values are rejected).
response:
exclude:
- result
- hasMore
- columns
- is_cached
- query_status
- insightsql
- types
insight-delete:
operation: insights_destroy
enabled: true
scopes:
- insight:write
annotations:
readOnly: false
destructive: true
idempotent: true
title: Delete insight
description: |
Soft-delete an insight by ID. The insight will be marked as deleted and no longer appear in lists.
param_overrides:
id:
aliases:
- insightId
- insight_id
- short_id
- shortId
soft_delete: true
insight-get:
operation: insights_retrieve
enabled: true
scopes:
- insight:read
annotations:
readOnly: true
destructive: false
idempotent: true
enrich_url: '{short_id}'
title: Get insight
description: >
Fetch a saved insight by its numeric `id` or 8-character `short_id`. Returns the insight metadata and query
definition, but NOT the query results. To retrieve the actual data, call the insight-query tool with the
same identifier. Optionally accepts `variables_override` and `filters_override` to apply one-off overrides
to the returned query definition without mutating the saved insight.
exclude_params:
- format
- refresh
- from_dashboard
param_overrides:
id:
aliases:
- insightId
- insight_id
- short_id
- shortId
response:
exclude:
- result
- hasMore
- columns
- is_cached
- query_status
- insightsql
- types
insight-update:
operation: insights_partial_update
enabled: true
scopes:
- insight:write
annotations:
readOnly: false
destructive: false
idempotent: true
enrich_url: '{short_id}'
title: Update insight
description: >
Update a saved insight by numeric `id` or `short_id`. Can update name, description, query, tags, favorited
status, and dashboards. Returns insight metadata only — after updating the query, call the insight-query
tool with the same identifier if you want to see the recomputed results.
exclude_params:
- query
include_params:
- name
- description
- tags
- favorited
- dashboards
param_overrides:
id:
aliases:
- insightId
- insight_id
- short_id
- shortId
query:
schema_ref: InsightQuery
dashboards:
description: >
Dashboard IDs this insight should belong to. This is a full replacement — always include all
existing dashboard IDs when adding a new one.
description:
description: |
Human-readable summary of what the insight shows. Max 400 characters (longer values are rejected).
response:
exclude:
- result
- hasMore
- columns
- is_cached
- query_status
- insightsql
- types
insights-activity-retrieve:
operation: insights_activity_retrieve
enabled: true
scopes:
- activity_log:read
annotations:
readOnly: true
destructive: false
idempotent: true
list: true
title: Get insight activity log
description: >
Audit trail for a single insight by numeric `id`. Returns a paginated list of every change made to it
(created, edited, deleted, restored), including who made each change and which fields changed. The full
`before`/`after` diff blobs are omitted to keep responses agent-friendly — to inspect the current state of
the insight after a change, call `insight-get` with the insight's `short_id`. Paginate with `limit` and
`page`.
response:
exclude:
- detail.changes.*.before
- detail.changes.*.after
- detail.trigger
- detail.type
insights-activity-retrieve-2:
operation: insights_activity_retrieve
enabled: false
insights-all-activity-retrieve:
operation: insights_all_activity_retrieve
enabled: true
scopes:
- activity_log:read
annotations:
readOnly: true
destructive: false
idempotent: true
list: true
title: Get recent insight activity across the project
description: >
Project-wide audit trail of changes to all insights, most recent first. Returns who created, edited,
deleted, or restored each insight and which fields changed. Useful for surfacing what people (or agents)
have been working on recently. The full `before`/`after` diff blobs are omitted to keep responses
agent-friendly — drill into a specific insight with `insights-activity-retrieve` (or `insight-get` for
current state). Paginate with `limit` and `page`.
response:
exclude:
- detail.changes.*.before
- detail.changes.*.after
- detail.trigger
- detail.type
insights-analyze-retrieve:
operation: insights_analyze_retrieve
enabled: false
insights-bulk-delete-create:
operation: insights_bulk_delete_create
enabled: false
insights-bulk-restore-create:
operation: insights_bulk_restore_create
enabled: false
insights-bulk-update-tags-create:
operation: insights_bulk_update_tags_create
enabled: false
insights-cancel-create:
operation: insights_cancel_create
enabled: false
insights-generate-metadata-create:
operation: insights_generate_metadata_create
enabled: false
insights-list:
operation: insights_list
enabled: true
scopes:
- insight:read
annotations:
readOnly: true
destructive: false
idempotent: true
enrich_url: '{short_id}'
list: true
title: Get all insights
description: >
List saved insights in the project with optional filtering by favorited status or search term. Returns
metadata only (name, description, tags, dashboards, ownership) — NOT the query results. To retrieve the
actual data for any insight in the list, call the insight-query tool with its `short_id` or numeric `id`.
exclude_params:
- basic
- format
- refresh
param_overrides:
limit:
cast: string-int
offset:
cast: string-int
response:
include:
- id
- short_id
- name
- derived_name
- description
- tags
- favorited
- dashboards
- created_at
- created_by
- last_modified_at
- last_modified_by
- last_viewed_at
- alerts
insights-my-last-viewed-retrieve:
operation: insights_my_last_viewed_retrieve
enabled: false
insights-suggestions-create:
operation: insights_suggestions_create
enabled: false
insights-suggestions-retrieve:
operation: insights_suggestions_retrieve
enabled: false
insights-trending-retrieve:
operation: insights_trending_retrieve
enabled: true
scopes:
- insight:read
annotations:
readOnly: true
destructive: false
idempotent: true
enrich_url: '{short_id}'
list: true
title: Get most-viewed insights
description: >
Returns the most-viewed insights in the project, ranked by view count over the last N days (default 7). Use
this to surface the insights that matter most to the team — the ones people actually open. Each result
includes standard insight metadata plus `view_count` and up to 3 recent `viewers`. Returns metadata only —
call `insight-query` with the returned `short_id` to fetch the actual data for any of them.
response:
include:
- id
- short_id
- name
- derived_name
- description
- tags
- favorited
- dashboards
- created_at
- created_by
- last_modified_at
- last_modified_by
- last_viewed_at
- view_count
- viewers
insights-update:
operation: insights_update
enabled: false
insights-viewed-create:
operation: insights_viewed_create
enabled: false