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,
|
||||
ResourceListChangedNotification,
|
||||
ResourceListChangedNotificationSchema,
|
||||
Tool,
|
||||
ToolListChangedNotification,
|
||||
ToolListChangedNotificationSchema,
|
||||
} from "@modelcontextprotocol/sdk/types.js";
|
||||
|
|
@ -107,9 +108,7 @@ export { PostMessageTransport } from "./message-transport";
|
|||
* });
|
||||
* ```
|
||||
*/
|
||||
export function getToolUiResourceUri(tool: {
|
||||
_meta?: Record<string, unknown>;
|
||||
}): string | undefined {
|
||||
export function getToolUiResourceUri(tool: Partial<Tool>): string | undefined {
|
||||
// Try new nested format first: _meta.ui.resourceUri
|
||||
const uiMeta = tool._meta?.ui as { resourceUri?: unknown } | undefined;
|
||||
let uri: unknown = uiMeta?.resourceUri;
|
||||
|
|
|
|||
Loading…
Reference in a new issue