@@ -96,7 +96,6 @@ enum ToolName {
9696}
9797
9898// MCP Apps constants
99- const RESOURCE_URI_META_KEY = "ui/resourceUri" ;
10099const HELLO_WORLD_APP_URI = "ui://hello-world/app.html" ;
101100
102101enum PromptName {
@@ -492,7 +491,7 @@ export const createMcpServer = (): McpServerWrapper => {
492491 description :
493492 "Demonstrates MCP Apps - returns an interactive UI that runs in the client" ,
494493 inputSchema : { type : "object" , properties : { } } ,
495- _meta : { [ RESOURCE_URI_META_KEY ] : HELLO_WORLD_APP_URI } ,
494+ _meta : { ui : { resourceUri : HELLO_WORLD_APP_URI } } ,
496495 } ,
497496 ] ;
498497
@@ -767,7 +766,19 @@ export const createMcpServer = (): McpServerWrapper => {
767766 text : "If this client supports MCP Apps, an interactive UI should have rendered for the user." ,
768767 } ,
769768 ] ,
770- _meta : { [ RESOURCE_URI_META_KEY ] : HELLO_WORLD_APP_URI } ,
769+ structuredContent : {
770+ greeting : "Hello from MCP Apps!" ,
771+ timestamp : new Date ( ) . toISOString ( ) ,
772+ features : [ "interactive UI" , "bidirectional communication" , "theme support" ] ,
773+ stats : {
774+ version : "1.0.0" ,
775+ requestCount : Math . floor ( Math . random ( ) * 1000 ) ,
776+ } ,
777+ } ,
778+ _meta : {
779+ exampleKey : "exampleValue" ,
780+ processed : true ,
781+ } ,
771782 } ;
772783 }
773784
0 commit comments