aminghadersohi opened a new pull request, #36937:
URL: https://github.com/apache/superset/pull/36937

   ## Summary
   
   - **Fixed `ctx` error**: Added missing `@parse_request(GetChartDataRequest)` 
decorator to `get_chart_data` tool, which was causing the error: `missing 1 
required positional argument: 'ctx'` when calling from MCP clients
   - **Added raw data option**: New `include_raw_data` parameter that retrieves 
all columns from the underlying dataset instead of the chart's aggregated view, 
solving the issue where charts like `big_number` return only a single 
aggregated row
   
   ## Test plan
   
   - [ ] Test `get_chart_data` tool via MCP client to verify no `ctx` error
   - [ ] Test `get_chart_data` with `include_raw_data=true` to get full dataset 
rows
   - [ ] Test `get_chart_data` with `include_raw_data=false` (default) to get 
chart's normal aggregated view
   
   ## Additional Information
   
   Reported issues:
   1. `get_chart_data` was returning: `missing 1 required positional argument: 
'ctx'`
   2. Users were getting "limited data" / "single aggregated values" instead of 
full data
   
   Root causes:
   1. The `@parse_request` decorator was missing (other tools like 
`get_chart_info` have it) - this decorator handles FastMCP's context injection
   2. The query was using the chart's `form_data` which includes aggregations 
(`metrics`), causing charts like `big_number` to return only one aggregated row
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to