@@ -5,6 +5,7 @@ import type {
55 CompleteRequestResourceTemplate ,
66 CompleteResult ,
77 GetPromptResult ,
8+ Icon ,
89 Implementation ,
910 ListPromptsResult ,
1011 ListResourcesResult ,
@@ -438,6 +439,7 @@ export class McpServer {
438439 name,
439440 title : prompt . title ,
440441 description : prompt . description ,
442+ icons : prompt . icons ,
441443 arguments : prompt . argsSchema ? promptArgumentsFromStandardSchema ( prompt . argsSchema ) : undefined ,
442444 _meta : prompt . _meta
443445 } ;
@@ -607,6 +609,7 @@ export class McpServer {
607609 name : string ,
608610 title : string | undefined ,
609611 description : string | undefined ,
612+ icons : Icon [ ] | undefined ,
610613 argsSchema : StandardSchemaWithJSON | undefined ,
611614 callback : PromptCallback < StandardSchemaWithJSON | undefined > ,
612615 _meta : Record < string , unknown > | undefined
@@ -618,6 +621,7 @@ export class McpServer {
618621 const registeredPrompt : RegisteredPrompt = {
619622 title,
620623 description,
624+ icons,
621625 argsSchema,
622626 _meta,
623627 handler : createPromptHandler ( name , argsSchema , callback ) ,
@@ -632,6 +636,7 @@ export class McpServer {
632636 }
633637 if ( updates . title !== undefined ) registeredPrompt . title = updates . title ;
634638 if ( updates . description !== undefined ) registeredPrompt . description = updates . description ;
639+ if ( updates . icons !== undefined ) registeredPrompt . icons = updates . icons ;
635640 if ( updates . _meta !== undefined ) registeredPrompt . _meta = updates . _meta ;
636641
637642 // Track if we need to regenerate the handler
@@ -857,6 +862,7 @@ export class McpServer {
857862 config : {
858863 title ?: string ;
859864 description ?: string ;
865+ icons ?: Icon [ ] ;
860866 argsSchema ?: Args ;
861867 _meta ?: Record < string , unknown > ;
862868 } ,
@@ -868,6 +874,7 @@ export class McpServer {
868874 config : {
869875 title ?: string ;
870876 description ?: string ;
877+ icons ?: Icon [ ] ;
871878 argsSchema ?: Args ;
872879 _meta ?: Record < string , unknown > ;
873880 } ,
@@ -878,6 +885,7 @@ export class McpServer {
878885 config : {
879886 title ?: string ;
880887 description ?: string ;
888+ icons ?: Icon [ ] ;
881889 argsSchema ?: StandardSchemaWithJSON | ZodRawShape ;
882890 _meta ?: Record < string , unknown > ;
883891 } ,
@@ -887,12 +895,13 @@ export class McpServer {
887895 throw new Error ( `Prompt ${ name } is already registered` ) ;
888896 }
889897
890- const { title, description, argsSchema, _meta } = config ;
898+ const { title, description, icons , argsSchema, _meta } = config ;
891899
892900 const registeredPrompt = this . _createRegisteredPrompt (
893901 name ,
894902 title ,
895903 description ,
904+ icons ,
896905 normalizeRawShapeSchema ( argsSchema ) ,
897906 cb as PromptCallback < StandardSchemaWithJSON | undefined > ,
898907 _meta
@@ -1192,6 +1201,7 @@ type ToolCallbackInternal = (args: unknown, ctx: ServerContext) => CallToolResul
11921201export type RegisteredPrompt = {
11931202 title ?: string ;
11941203 description ?: string ;
1204+ icons ?: Icon [ ] ;
11951205 argsSchema ?: StandardSchemaWithJSON ;
11961206 _meta ?: Record < string , unknown > ;
11971207 /** @hidden */
@@ -1203,6 +1213,7 @@ export type RegisteredPrompt = {
12031213 name ?: string | null ;
12041214 title ?: string ;
12051215 description ?: string ;
1216+ icons ?: Icon [ ] ;
12061217 argsSchema ?: Args ;
12071218 _meta ?: Record < string , unknown > ;
12081219 callback ?: PromptCallback < Args > ;
0 commit comments