@@ -8,6 +8,7 @@ import type {
88 CreateTaskResult ,
99 CreateTaskServerContext ,
1010 GetPromptResult ,
11+ Icon ,
1112 Implementation ,
1213 ListPromptsResult ,
1314 ListResourcesResult ,
@@ -144,6 +145,7 @@ export class McpServer {
144145 inputSchema : tool . inputSchema
145146 ? ( standardSchemaToJsonSchema ( tool . inputSchema , 'input' ) as Tool [ 'inputSchema' ] )
146147 : EMPTY_OBJECT_JSON_SCHEMA ,
148+ icons : tool . icons ,
147149 annotations : tool . annotations ,
148150 execution : tool . execution ,
149151 _meta : tool . _meta
@@ -770,6 +772,7 @@ export class McpServer {
770772 description : string | undefined ,
771773 inputSchema : StandardSchemaWithJSON | undefined ,
772774 outputSchema : StandardSchemaWithJSON | undefined ,
775+ icons : Icon [ ] | undefined ,
773776 annotations : ToolAnnotations | undefined ,
774777 execution : ToolExecution | undefined ,
775778 _meta : Record < string , unknown > | undefined ,
@@ -786,6 +789,7 @@ export class McpServer {
786789 description,
787790 inputSchema,
788791 outputSchema,
792+ icons,
789793 annotations,
790794 execution,
791795 _meta,
@@ -822,6 +826,7 @@ export class McpServer {
822826 }
823827
824828 if ( updates . outputSchema !== undefined ) registeredTool . outputSchema = updates . outputSchema ;
829+ if ( updates . icons !== undefined ) registeredTool . icons = updates . icons ;
825830 if ( updates . annotations !== undefined ) registeredTool . annotations = updates . annotations ;
826831 if ( updates . _meta !== undefined ) registeredTool . _meta = updates . _meta ;
827832 if ( updates . enabled !== undefined ) registeredTool . enabled = updates . enabled ;
@@ -869,6 +874,7 @@ export class McpServer {
869874 description ?: string ;
870875 inputSchema ?: InputArgs ;
871876 outputSchema ?: OutputArgs ;
877+ icons ?: Icon [ ] ;
872878 annotations ?: ToolAnnotations ;
873879 _meta ?: Record < string , unknown > ;
874880 } ,
@@ -878,14 +884,15 @@ export class McpServer {
878884 throw new Error ( `Tool ${ name } is already registered` ) ;
879885 }
880886
881- const { title, description, inputSchema, outputSchema, annotations, _meta } = config ;
887+ const { title, description, inputSchema, outputSchema, icons , annotations, _meta } = config ;
882888
883889 return this . _createRegisteredTool (
884890 name ,
885891 title ,
886892 description ,
887893 inputSchema ,
888894 outputSchema ,
895+ icons ,
889896 annotations ,
890897 { taskSupport : 'forbidden' } ,
891898 _meta ,
@@ -1094,6 +1101,7 @@ export type RegisteredTool = {
10941101 description ?: string ;
10951102 inputSchema ?: StandardSchemaWithJSON ;
10961103 outputSchema ?: StandardSchemaWithJSON ;
1104+ icons ?: Icon [ ] ;
10971105 annotations ?: ToolAnnotations ;
10981106 execution ?: ToolExecution ;
10991107 _meta ?: Record < string , unknown > ;
@@ -1109,6 +1117,7 @@ export type RegisteredTool = {
11091117 description ?: string ;
11101118 paramsSchema ?: StandardSchemaWithJSON ;
11111119 outputSchema ?: StandardSchemaWithJSON ;
1120+ icons ?: Icon [ ] ;
11121121 annotations ?: ToolAnnotations ;
11131122 _meta ?: Record < string , unknown > ;
11141123 callback ?: ToolCallback < StandardSchemaWithJSON > ;
0 commit comments