aminghadersohi commented on code in PR #36271:
URL: https://github.com/apache/superset/pull/36271#discussion_r2561083197


##########
superset/mcp_service/chart/tool/generate_chart.py:
##########
@@ -51,8 +52,11 @@
 @mcp.tool
 @mcp_auth_hook
 @parse_request(GenerateChartRequest)
+# NOTE: Accept str | GenerateChartRequest to support LLM clients that send 
double-escaped
+# JSON strings instead of native Pydantic types. The @parse_request decorator
+# handles conversion, ensuring compatibility with all MCP clients.
 async def generate_chart(  # noqa: C901
-    request: GenerateChartRequest, ctx: Context
+    request: str | GenerateChartRequest, ctx: Context

Review Comment:
   yeah it does that. but without the `| str` the tool can't be called for some 
reason 



-- 
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