File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,19 @@ type JsonRpcRequest = {
3131 params ?: Record < string , unknown > ;
3232} ;
3333
34+ type McpTextContent = {
35+ type : "text" ;
36+ text : string ;
37+ } ;
38+
39+ type McpImageContent = {
40+ type : "image" ;
41+ data : string ;
42+ mimeType : string ;
43+ } ;
44+
45+ type McpContentItem = McpTextContent | McpImageContent ;
46+
3447// ---------------------------------------------------------------------------
3548// Tool definitions — HTTP format (used by /tools endpoint)
3649// ---------------------------------------------------------------------------
@@ -390,7 +403,7 @@ async function handleMcpToolCall(
390403 toolArgs : Record < string , unknown > ,
391404 registryUrl : string ,
392405 env : Env ,
393- ) : Promise < { content : Array < { type : string ; text : string } > } > {
406+ ) : Promise < { content : McpContentItem [ ] } > {
394407 if ( toolName === "search_shaders" ) {
395408 const results = await handleSearchShaders (
396409 toolArgs as {
@@ -471,7 +484,7 @@ async function handleMcpToolCall(
471484 playgroundEnv ,
472485 ) ;
473486
474- const content : Array < { type : string ; text ?: string ; data ?: string ; mimeType ?: string } > = [ ] ;
487+ const content : McpContentItem [ ] = [ ] ;
475488
476489 // Always include text status
477490 content . push ( {
You can’t perform that action at this time.
0 commit comments