MCP: expose time to convert on get_funnel

Ouverte
#650 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@gmann14 y travaille déjà.

Depuis le 7/11/2026.

  • #660 par @gmann14 — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
72/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
typescript
Domaine
analytics

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
7.3k
Forks
552
Merge moyen
1 j 2 h
PR mergées (30 j)
18

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Aucun modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Openpanel-dev/openpanel

Toutes les issues de Openpanel-dev/openpanel

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.