Use as the input type in
This commit is contained in:
parent
db1b48552b
commit
5bb0c6b4c7
1 changed files with 2 additions and 3 deletions
|
|
@ -31,6 +31,7 @@ import {
|
||||||
ReadResourceResultSchema,
|
ReadResourceResultSchema,
|
||||||
ResourceListChangedNotification,
|
ResourceListChangedNotification,
|
||||||
ResourceListChangedNotificationSchema,
|
ResourceListChangedNotificationSchema,
|
||||||
|
Tool,
|
||||||
ToolListChangedNotification,
|
ToolListChangedNotification,
|
||||||
ToolListChangedNotificationSchema,
|
ToolListChangedNotificationSchema,
|
||||||
} from "@modelcontextprotocol/sdk/types.js";
|
} from "@modelcontextprotocol/sdk/types.js";
|
||||||
|
|
@ -107,9 +108,7 @@ export { PostMessageTransport } from "./message-transport";
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
export function getToolUiResourceUri(tool: {
|
export function getToolUiResourceUri(tool: Partial<Tool>): string | undefined {
|
||||||
_meta?: Record<string, unknown>;
|
|
||||||
}): string | undefined {
|
|
||||||
// Try new nested format first: _meta.ui.resourceUri
|
// Try new nested format first: _meta.ui.resourceUri
|
||||||
const uiMeta = tool._meta?.ui as { resourceUri?: unknown } | undefined;
|
const uiMeta = tool._meta?.ui as { resourceUri?: unknown } | undefined;
|
||||||
let uri: unknown = uiMeta?.resourceUri;
|
let uri: unknown = uiMeta?.resourceUri;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue