mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
Every first-party Python caller and test now names the mount the API actually answers on. Mechanical: URL literals only, and only where the /api/ was ours -- a preceding word character means it was a module path like insights/api/ or a third-party host like slack.com/api/, and those are untouched. Left saying /api/, each for a reason rather than for safety: - products/warehouse_sources/.../sources/** is a catalogue of vendor endpoints - services/llm-gateway deploys separately and is under a code freeze, so moving its two calls would break it during the skew - the mcp_store and Slack/Teams redirect_uris are registered with third parties and must byte-match what was registered - the Wizard and Raycast client-metadata paths are OAuth client_ids - /api/surveys and /api/feature_flag/local_evaluation are SDK aliases the ingress routes to the Rust fleets, held by released SDK versions Test URLconfs moved with the requests that call them, and the Datastore user-selection fixtures now carry the leading slash that request.path has.
238 lines
7.7 KiB
YAML
238 lines
7.7 KiB
YAML
# MCP query wrapper tool definitions.
|
|
#
|
|
# Each wrapper generates a typed tool that accepts a single query schema
|
|
# from frontend/src/queries/schema.json and POSTs to /v1/environments/{project_id}/query/.
|
|
#
|
|
# schema_ref must match a definition name in schema.json exactly.
|
|
# The Zod input schema is auto-generated from the JSON Schema at build time.
|
|
category: Query wrappers
|
|
feature: insights
|
|
wrappers:
|
|
query-trends:
|
|
schema_ref: AssistantTrendsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: Run a trends query
|
|
description_file: ./prompts/query-trends.md
|
|
system_prompt_hint: Time series, aggregations, formulas, comparisons
|
|
ui_resource_uri: ui://insights/query-results.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
- samplingFactor
|
|
|
|
query-funnel:
|
|
schema_ref: AssistantFunnelsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: Run a funnel query
|
|
description_file: ./prompts/query-funnel.md
|
|
system_prompt_hint: Conversion rates, drop-off analysis, time to convert
|
|
ui_resource_uri: ui://insights/query-results.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
- samplingFactor
|
|
|
|
query-retention:
|
|
schema_ref: AssistantRetentionQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: Run a retention query
|
|
description_file: ./prompts/query-retention.md
|
|
system_prompt_hint: User return patterns over time
|
|
ui_resource_uri: ui://insights/query-results.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
- samplingFactor
|
|
|
|
query-stickiness:
|
|
schema_ref: AssistantStickinessQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: Run a stickiness query
|
|
description_file: ./prompts/query-stickiness.md
|
|
system_prompt_hint: Engagement frequency (how many days users do X)
|
|
ui_resource_uri: ui://insights/query-results.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
- samplingFactor
|
|
|
|
query-paths:
|
|
schema_ref: AssistantPathsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: Run a paths query
|
|
description_file: ./prompts/query-paths.md
|
|
system_prompt_hint: User navigation flows and sequences
|
|
ui_resource_uri: ui://insights/query-results.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
- samplingFactor
|
|
|
|
query-lifecycle:
|
|
schema_ref: AssistantLifecycleQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: Run a lifecycle query
|
|
description_file: ./prompts/query-lifecycle.md
|
|
system_prompt_hint: New, returning, resurrecting, dormant user composition
|
|
ui_resource_uri: ui://insights/query-results.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
- samplingFactor
|
|
|
|
query-trends-actors:
|
|
schema_ref: AssistantTrendsActorsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
- person:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: List persons behind a trends data point
|
|
description_file: ./prompts/query-trends-actors.md
|
|
system_prompt_hint: List persons behind a trends data point
|
|
ui_resource_uri: ui://insights/insight-actors.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
|
|
query-lifecycle-actors:
|
|
schema_ref: AssistantLifecycleActorsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
- person:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: List persons in a lifecycle bucket
|
|
description_file: ./prompts/query-lifecycle-actors.md
|
|
system_prompt_hint: List persons in a lifecycle bucket (new/returning/resurrecting/dormant) for a given day
|
|
ui_resource_uri: ui://insights/insight-actors.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
|
|
query-paths-actors:
|
|
schema_ref: AssistantPathsActorsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
- person:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: List persons on a paths insight
|
|
description_file: ./prompts/query-paths-actors.md
|
|
system_prompt_hint: List persons who traversed the paths defined by a paths insight
|
|
ui_resource_uri: ui://insights/insight-actors.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
|
|
query-retention-actors:
|
|
schema_ref: AssistantRetentionActorsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
- person:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: List persons in a retention cohort
|
|
description_file: ./prompts/query-retention-actors.md
|
|
system_prompt_hint: List persons in a retention acquisition cohort and which intervals they returned in
|
|
ui_resource_uri: ui://insights/insight-actors.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
|
|
query-stickiness-actors:
|
|
schema_ref: AssistantStickinessActorsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
- person:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: List persons behind a stickiness bar
|
|
description_file: ./prompts/query-stickiness-actors.md
|
|
system_prompt_hint: List persons who were active in a given number of intervals (one stickiness bar)
|
|
ui_resource_uri: ui://insights/insight-actors.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|
|
|
|
query-funnel-actors:
|
|
schema_ref: AssistantFunnelsActorsQuery
|
|
enabled: true
|
|
scopes:
|
|
- query:read
|
|
- person:read
|
|
annotations:
|
|
readOnly: true
|
|
destructive: false
|
|
idempotent: true
|
|
title: List persons who converted or dropped off at a funnel step
|
|
description_file: ./prompts/query-funnel-actors.md
|
|
system_prompt_hint: List persons who converted through or dropped off at a given funnel step
|
|
ui_resource_uri: ui://insights/insight-actors.html
|
|
use_optimized_output: true
|
|
exclude_properties:
|
|
- response
|
|
- modifiers
|