Skip to content

run_ga4_report — dimensions and metrics parameters fail Pydantic validation when passed as JSON arrays #28

@sg-modlab

Description

@sg-modlab

So odd but I am reporting what Claude is sharing is an issue. I have been having trouble getting to share back some data that requires run_ga4_report. Continues to complain about parameters. I tried with the latest version of AdLoop released today and because this is in Cowork that I experienced this, I copied to the rules shared to an AdLoop skill. So very curious if indeed this is an issue and hope I'm not just making noise here.


Tool: mcp__adloop__run_ga4_report

Description:
The dimensions and metrics parameters are documented as accepting lists, but any value passed — including valid JSON arrays — is received by Pydantic as a string and fails validation with Input should be a valid list.

Error:

2 validation errors for call[run_ga4_report]
dimensions
  Input should be a valid list [type=list_type, input_value='["pagePath"]', input_type=str]
metrics
  Input should be a valid list [type=list_type, input_value='["sessions", "totalUsers", "screenPageViews", "bounceRate", "conversions"]', input_type=str]

What was tried:

  • ["pagePath"] — fails
  • ["sessions", "totalUsers", ...] — fails
  • Bare string pagePath — fails with same error

Tool schema (as returned by the MCP server):

{
  "dimensions": { "default": null },
  "metrics": { "default": null }
}

No type is declared for either parameter in the schema, but the underlying Pydantic model expects a list type.

Expected behavior: Passing ["pagePath"] as a JSON array should be accepted and parsed correctly.

Workaround: landing_page_analysis works for paid-session page data, but doesn't support all-source session breakdowns or custom dimension/metric combinations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions