Skip to content

MCP: expose time to convert on get_funnel #650

Open

Description

@deniskern

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions