55 */
66
77import {
8- RESOURCE_URI_META_KEY as _RESOURCE_URI_META_KEY ,
8+ RESOURCE_URI_META_KEY ,
9+ RESOURCE_MIME_TYPE ,
910 McpUiResourceMeta ,
1011 McpUiToolMeta ,
11- RESOURCE_MIME_TYPE ,
1212} from "../app.js" ;
1313import type {
1414 McpServer ,
@@ -19,13 +19,10 @@ import type {
1919import type { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js" ;
2020import type { ZodRawShape } from "zod" ;
2121
22- // Re-export SDK types for convenience
22+ // Re-exports for convenience
23+ export { RESOURCE_URI_META_KEY , RESOURCE_MIME_TYPE } ;
2324export type { ResourceMetadata , ToolCallback , ReadResourceCallback } ;
2425
25- // Re-export for convenience
26- export const RESOURCE_URI_META_KEY = _RESOURCE_URI_META_KEY ;
27- export { RESOURCE_MIME_TYPE } ;
28-
2926/**
3027 * Tool configuration (same as McpServer.registerTool).
3128 */
@@ -43,17 +40,20 @@ export interface ToolConfig {
4340export interface McpUiAppToolConfig extends ToolConfig {
4441 _meta : {
4542 [ key : string ] : unknown ;
46- } & ( {
47- ui : McpUiToolMeta ;
48- } | {
49- /**
50- * URI of the UI resource to display for this tool.
51- * This is converted to `_meta["ui/resourceUri"]`.
52- *
53- * @example "ui://weather/widget.html"
54- */
55- [ RESOURCE_URI_META_KEY ] ?: string ;
56- } ) ;
43+ } & (
44+ | {
45+ ui : McpUiToolMeta ;
46+ }
47+ | {
48+ /**
49+ * URI of the UI resource to display for this tool.
50+ * This is converted to `_meta["ui/resourceUri"]`.
51+ *
52+ * @example "ui://weather/widget.html"
53+ */
54+ [ RESOURCE_URI_META_KEY ] ?: string ;
55+ }
56+ ) ;
5757}
5858
5959/**
0 commit comments