PipedreamHQ / PipedreamHQ/pipedream

[BUG] GA4 Integration Error -32602: Dimensions Parameter Type Mismatch in Claude Desktop MCP

Open
#16,566 2 comments 0 reactions 0 assignees View on GitHub
bug tracked internally triaged
Dominant language
JavaScript
Stars
11.7k
Forks
5.8k
Avg merge
3d 10h
Merged PRs (30d)
102

Description

When using the google_analytics-run-report-in-ga4 component within Claude Desktop via Model Context Protocol (MCP), there is a consistent error when passing array parameters. Specifically, the dimensions parameter is always interpreted as a string instead of an array, resulting in an MCP error -32602 with the message "Expected array, received string".

To Reproduce
Steps to reproduce the behavior:

Configure a workflow with the google_analytics-run-report-in-ga4 component
Attempt to call this component from Claude Desktop with the following parameters:

{
"property": "properties/384059648",
"startDate": "2025-04-04",
"endDate": "2025-05-04",
"metrics": ["screenPageViews", "sessions", "engagementRate", "bounceRate"],
"dimensions": ["pageTitle", "pagePath"]
}

Execute the call
Receive error: MCP error -32602: "Expected array, received string" for the dimensions parameter

This error persists regardless of how the dimensions parameter is formatted:

As a JSON array: ["pageTitle", "pagePath"]
As a comma-separated string: pageTitle,pagePath
Without quotes: [pageTitle, pagePath]

Expected behavior
The dimensions parameter should be properly recognized as an array of strings, as defined in the component's props configuration (type: "string[]"). The report should execute successfully with the provided dimensions.
Screenshots

![Image](https://github.com/user-attachments/assets/35dbeb9a-f819-4032-9f4d-fa7ed340b5b5)

Image

Additional context
The source code of the component shows that both metrics and dimensions are defined as type: "string[]" in the props:
javascriptdimensions: {
type: "string[]",
label: "Dimensions",
description: "Dimension attributes for your data...",
optional: true,
},
However, while the metrics parameter seems to work correctly, the dimensions parameter is consistently interpreted as a string. This suggests there might be an issue with how array parameters are being passed or processed between Claude Desktop and the Pipedream MCP endpoint.
The specific MCP endpoint being used is:
https://mcp.pipedream.net/CENSURED/google_analytics

This appears to be an integration issue between Claude Desktop and Pipedream-hosted MCP tools, specifically related to how certain array parameters are handled.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.