MCP: expose time to convert on get_funnel

Aperta
#650 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@gmann14 ci sta già lavorando.

Dal 7/11/2026.

  • #660 di @gmann14 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
analytics

Direzione di ricerca

Start with packages/core/src/modules/mcp/src/tools/analytics/funnel.ts and trace how get_funnel defines its inputs and calls getFunnelCore; compare this with the report setting and funnel service mentioned in the issue. Check the existing funnel tool tests and add coverage for the optional setting and per-step durations. Done when all listed aggregation choices work, while omitting the input preserves today's output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Funnel reports can show time to convert per step since #619 (options.timeToConvert), but the MCP tool get_funnel does not offer it. An agent or other MCP client therefore cannot answer "how long do people take from add-to-cart to checkout?".

Current behavior

packages/core/src/modules/mcp/src/tools/analytics/funnel.ts has no timeToConvert input and calls getFunnelCore without it, as of v3.26.0. The setting exists only in the report builder and the funnel service.

Proposal

Add an optional timeToConvert input to get_funnel with the same values as the report setting (off by default, average, median, min, max, 25th, 75th, 90th, 99th percentile), and return the per-step duration in the tool result. Omitting the input keeps today's output unchanged.

Why

We read OpenPanel only through MCP from our own dashboard, on the self-hosted supporter build. Going around the tool with direct ClickHouse queries would duplicate your funnel logic, so the tool is the right place for this.

Lingua principale
TypeScript
Stelle
7.3k
Fork
552
Merge medio
1g 2h
PR unite (30g)
18

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Openpanel-dev/openpanel

Tutte le issue di Openpanel-dev/openpanel

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.