Skip to content

Commit 4898f67

Browse files
committed
Icon schema sizes property - align with spec
1 parent cc91c4c commit 4898f67

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/types.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export const IconSchema = z
216216
/**
217217
* Optional string specifying icon dimensions (e.g., "48x48 96x96").
218218
*/
219-
sizes: z.optional(z.string()),
219+
sizes: z.optional(z.array(z.string())),
220220
})
221221
.passthrough();
222222

@@ -542,17 +542,12 @@ export const ResourceSchema = BaseMetadataSchema.extend({
542542
*/
543543
mimeType: z.optional(z.string()),
544544

545-
/**
546-
* An optional list of icons for this resource.
547-
*/
548-
icons: z.optional(z.array(IconSchema)),
549-
550545
/**
551546
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
552547
* for notes on _meta usage.
553548
*/
554549
_meta: z.optional(z.object({}).passthrough()),
555-
});
550+
}).merge(IconsSchema);
556551

557552
/**
558553
* A template description for resources available on the server.
@@ -713,16 +708,12 @@ export const PromptSchema = BaseMetadataSchema.extend({
713708
* A list of arguments to use for templating the prompt.
714709
*/
715710
arguments: z.optional(z.array(PromptArgumentSchema)),
716-
/**
717-
* An optional list of icons for this prompt.
718-
*/
719-
icons: z.optional(z.array(IconSchema)),
720711
/**
721712
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
722713
* for notes on _meta usage.
723714
*/
724715
_meta: z.optional(z.object({}).passthrough()),
725-
});
716+
}).merge(IconsSchema);
726717

727718
/**
728719
* Sent from the client to request a list of prompts and prompt templates the server has.
@@ -975,17 +966,12 @@ export const ToolSchema = BaseMetadataSchema.extend({
975966
*/
976967
annotations: z.optional(ToolAnnotationsSchema),
977968

978-
/**
979-
* An optional list of icons for this tool.
980-
*/
981-
icons: z.optional(z.array(IconSchema)),
982-
983969
/**
984970
* See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
985971
* for notes on _meta usage.
986972
*/
987973
_meta: z.optional(z.object({}).passthrough()),
988-
});
974+
}).merge(IconsSchema);
989975

990976
/**
991977
* Sent from the client to request a list of tools the server has.

0 commit comments

Comments
 (0)