@@ -8,6 +8,7 @@ import type {
88 CreateTaskResult ,
99 CreateTaskServerContext ,
1010 GetPromptResult ,
11+ Icon ,
1112 Implementation ,
1213 ListPromptsResult ,
1314 ListResourcesResult ,
@@ -143,6 +144,7 @@ export class McpServer {
143144 name,
144145 title : tool . title ,
145146 description : tool . description ,
147+ icons : tool . icons ,
146148 inputSchema : tool . inputSchema
147149 ? ( standardSchemaToJsonSchema ( tool . inputSchema , 'input' ) as Tool [ 'inputSchema' ] )
148150 : EMPTY_OBJECT_JSON_SCHEMA ,
@@ -772,6 +774,7 @@ export class McpServer {
772774 description : string | undefined ,
773775 inputSchema : StandardSchemaWithJSON | undefined ,
774776 outputSchema : StandardSchemaWithJSON | undefined ,
777+ icons : Icon [ ] | undefined ,
775778 annotations : ToolAnnotations | undefined ,
776779 execution : ToolExecution | undefined ,
777780 _meta : Record < string , unknown > | undefined ,
@@ -788,6 +791,7 @@ export class McpServer {
788791 description,
789792 inputSchema,
790793 outputSchema,
794+ icons,
791795 annotations,
792796 execution,
793797 _meta,
@@ -824,6 +828,7 @@ export class McpServer {
824828 }
825829
826830 if ( updates . outputSchema !== undefined ) registeredTool . outputSchema = updates . outputSchema ;
831+ if ( updates . icons !== undefined ) registeredTool . icons = updates . icons ;
827832 if ( updates . annotations !== undefined ) registeredTool . annotations = updates . annotations ;
828833 if ( updates . _meta !== undefined ) registeredTool . _meta = updates . _meta ;
829834 if ( updates . enabled !== undefined ) registeredTool . enabled = updates . enabled ;
@@ -871,6 +876,7 @@ export class McpServer {
871876 description ?: string ;
872877 inputSchema ?: InputArgs ;
873878 outputSchema ?: OutputArgs ;
879+ icons ?: Icon [ ] ;
874880 annotations ?: ToolAnnotations ;
875881 _meta ?: Record < string , unknown > ;
876882 } ,
@@ -884,6 +890,7 @@ export class McpServer {
884890 description ?: string ;
885891 inputSchema ?: InputArgs ;
886892 outputSchema ?: OutputArgs ;
893+ icons ?: Icon [ ] ;
887894 annotations ?: ToolAnnotations ;
888895 _meta ?: Record < string , unknown > ;
889896 } ,
@@ -896,6 +903,7 @@ export class McpServer {
896903 description ?: string ;
897904 inputSchema ?: StandardSchemaWithJSON | ZodRawShape ;
898905 outputSchema ?: StandardSchemaWithJSON | ZodRawShape ;
906+ icons ?: Icon [ ] ;
899907 annotations ?: ToolAnnotations ;
900908 _meta ?: Record < string , unknown > ;
901909 } ,
@@ -905,14 +913,15 @@ export class McpServer {
905913 throw new Error ( `Tool ${ name } is already registered` ) ;
906914 }
907915
908- const { title, description, inputSchema, outputSchema, annotations, _meta } = config ;
916+ const { title, description, inputSchema, outputSchema, icons , annotations, _meta } = config ;
909917
910918 return this . _createRegisteredTool (
911919 name ,
912920 title ,
913921 description ,
914922 normalizeRawShapeSchema ( inputSchema ) ,
915923 normalizeRawShapeSchema ( outputSchema ) ,
924+ icons ,
916925 annotations ,
917926 { taskSupport : 'forbidden' } ,
918927 _meta ,
@@ -1162,6 +1171,7 @@ export type RegisteredTool = {
11621171 description ?: string ;
11631172 inputSchema ?: StandardSchemaWithJSON ;
11641173 outputSchema ?: StandardSchemaWithJSON ;
1174+ icons ?: Icon [ ] ;
11651175 annotations ?: ToolAnnotations ;
11661176 execution ?: ToolExecution ;
11671177 _meta ?: Record < string , unknown > ;
@@ -1177,6 +1187,7 @@ export type RegisteredTool = {
11771187 description ?: string ;
11781188 paramsSchema ?: StandardSchemaWithJSON ;
11791189 outputSchema ?: StandardSchemaWithJSON ;
1190+ icons ?: Icon [ ] ;
11801191 annotations ?: ToolAnnotations ;
11811192 _meta ?: Record < string , unknown > ;
11821193 callback ?: ToolCallback < StandardSchemaWithJSON > ;
0 commit comments