feat: add run_funnel_report tool using Data API v1alpha#127
Open
mderazon wants to merge 1 commit intogoogleanalytics:mainfrom
Open
feat: add run_funnel_report tool using Data API v1alpha#127mderazon wants to merge 1 commit intogoogleanalytics:mainfrom
mderazon wants to merge 1 commit intogoogleanalytics:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR picks up and completes the work from #54 (originally authored by @cagnusmarlsen), which added a
run_funnel_reporttool. That PR stalled due to merge conflicts and inactivity. This PR rebases cleanly on currentmainand incorporates all reviewer feedback from the original PR.Changes
analytics_mcp/tools/reporting/funnel.py(new file):run_funnel_reportasync function and its description builder_run_funnel_report_description()analytics_mcp/tools/reporting/metadata.py: addsget_funnel_steps_hints()with 7 proto-generated step examples covering common funnel configurationsanalytics_mcp/tools/utils.py: addsdata_v1alphaimport andcreate_data_api_alpha_client()factory functionanalytics_mcp/coordinator.py: registersrun_funnel_reportas an ADKFunctionToolalongside the existing toolsREADME.md: documents the new toolDifferences from #54
mcp.add_tool()pattern that no longer exists. This PR uses the current ADKFunctionToolregistration incoordinator.py.step_home_page_viewexample inget_funnel_steps_hints()now usespageLocationwithCONTAINSinstead ofpagePathwithEXACT, which is not supported inside funnel steps (flagged by @testyuminliang in the original PR).date_rangesparameter now safely handlesNonedefault (was crashing previously).main.Tested this locally and it was working great