Fix screen render mode from json to html for MCP compatibility
- Change default renderMode from json to html in screen execution service - json render mode not supported by Moqui screen framework - html mode allows web-dependent screens to render properly - Simple screens can now render successfully in MCP context - Web-dependent screens still fall back to URLs as expected
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -482,7 +482,7 @@ | ... | @@ -482,7 +482,7 @@ |
| 482 | 482 | ||
| 483 | // Now call the screen tool with proper user context | 483 | // Now call the screen tool with proper user context |
| 484 | serviceResult = ec.service.sync().name("McpServices.execute#ScreenAsMcpTool") | 484 | serviceResult = ec.service.sync().name("McpServices.execute#ScreenAsMcpTool") |
| 485 | .parameters([screenPath: screenPath, parameters: arguments ?: [:], renderMode: "json"]) | 485 | .parameters([screenPath: screenPath, parameters: arguments ?: [:], renderMode: "html"]) |
| 486 | .call() | 486 | .call() |
| 487 | 487 | ||
| 488 | } finally { | 488 | } finally { |
| ... | @@ -1324,7 +1324,7 @@ try { | ... | @@ -1324,7 +1324,7 @@ try { |
| 1324 | <in-parameters> | 1324 | <in-parameters> |
| 1325 | <parameter name="screenPath" required="true"/> | 1325 | <parameter name="screenPath" required="true"/> |
| 1326 | <parameter name="parameters" type="Map"><description>Parameters to pass to the screen</description></parameter> | 1326 | <parameter name="parameters" type="Map"><description>Parameters to pass to the screen</description></parameter> |
| 1327 | <parameter name="renderMode" default="json"><description>Render mode: json, text, csv, xml</description></parameter> | 1327 | <parameter name="renderMode" default="html"><description>Render mode: text, html, xml, vuet, qvt</description></parameter> |
| 1328 | </in-parameters> | 1328 | </in-parameters> |
| 1329 | <out-parameters> | 1329 | <out-parameters> |
| 1330 | <parameter name="result" type="Map"/> | 1330 | <parameter name="result" type="Map"/> | ... | ... |
-
Please register or sign in to post a comment