PipedreamHQ / PipedreamHQ/pipedream

[BUG] YouTube Analytics MCP - Error calling tool: Parameter 'dimensions' must be of type undefined

Open
#16,482 1 comment 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

# YouTube Analytics MCP Bug Report

## Issue Summary
The YouTube Analytics MCP implementation deviates from the official YouTube Analytics API documentation in several critical ways, making it incompatible with standard YouTube Analytics API query formats.

Error calling tool: Parameter 'dimensions' must be of type undefined, got array

Error calling tool: Parameter 'dimensions' must be of type undefined, got string

## Current Implementation vs Expected Behavior

### 1. Metrics Parameter
**Current:** Requires an array of strings
```json
"metrics": ["views", "estimatedMinutesWatched"]
```
**Expected:** Should accept comma-separated string per YouTube API docs
```json
"metrics": "views,estimatedMinutesWatched"
```

### 2. Dimensions Parameter
**Current:** Returns error "Parameter 'dimensions' must be of type undefined"
- Rejects both array and string formats
- Cannot be used at all in current implementation

**Expected:** Should accept comma-separated string per YouTube API docs
```json
"dimensions": "ageGroup,gender"
```
or
```json
"dimensions": "deviceType"
```

## Impact
This implementation prevents accessing critical YouTube Analytics features:
1. Cannot retrieve demographic data (age, gender)
2. Cannot get device type breakdowns
3. Cannot get geographic distribution
4. Cannot get top videos with their metrics
5. Cannot segment data by any dimension

## Documentation Reference
Per official YouTube Analytics API documentation:
- [Reports Query Reference](https://developers.google.com/youtube/analytics/reference/reports/query)
- [Channel Reports Reference](https://developers.google.com/youtube/analytics/channel_reports)

## Reproduction Steps
1. Any attempt to use dimensions parameter results in error
2. Using string format for metrics results in error: "Parameter 'metrics' must be of type array, got string"

## Additional Notes
The current implementation successfully retrieves basic metrics when formatted as arrays, proving the core API connection works. This suggests the issue is in the parameter handling layer of the MCP rather than the underlying API connection.

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.