File tree Expand file tree Collapse file tree 3 files changed +97
-79
lines changed Expand file tree Collapse file tree 3 files changed +97
-79
lines changed Original file line number Diff line number Diff line change 2020 "drizzle-orm" : " ^0.44.0"
2121 },
2222 "dependencies" : {
23+ "@mcp-ui/server" : " ^5.12.0" ,
2324 "@sveltejs/mcp-schema" : " workspace:^" ,
2425 "@tmcp/adapter-valibot" : " ^0.1.4" ,
2526 "@typescript-eslint/parser" : " ^8.44.0" ,
Original file line number Diff line number Diff line change 11import type { SvelteMcp } from '../../index.js' ;
22import * as v from 'valibot' ;
33import { icons } from '../../icons/index.js' ;
4+ import { createUIResource } from '@mcp-ui/server' ;
45
56async function compress_and_encode_text ( input : string ) {
67 const reader = new Blob ( [ input ] ) . stream ( ) . pipeThrough ( new CompressionStream ( 'gzip' ) ) . getReader ( ) ;
@@ -106,6 +107,14 @@ export function playground_link(server: SvelteMcp) {
106107 type : 'text' ,
107108 text : JSON . stringify ( content ) ,
108109 } ,
110+ createUIResource ( {
111+ uri : 'ui://svelte/playground-link' ,
112+ content : {
113+ type : 'externalUrl' ,
114+ iframeUrl : content . url ,
115+ } ,
116+ encoding : 'text' ,
117+ } ) ,
109118 ] ,
110119 structuredContent : content ,
111120 } ;
You can’t perform that action at this time.
0 commit comments