MCP: expose time to convert on get_funnel

Open
#650 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@gmann14 is already working on this.

Since Nov 7, 2026.

  • #660 by @gmann14 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
analytics

Research direction

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.

Written by the indexing model from the issue text.

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.

Dominant language
TypeScript
Stars
7.3k
Forks
552
Avg merge
1d 2h
Merged PRs (30d)
18

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Openpanel-dev/openpanel

All issues in Openpanel-dev/openpanel

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.