(def: McpToolDef)
| 9 | |
| 10 | /** Reads the MCP Apps `_meta.ui.resourceUri` link from a tool def, if present. */ |
| 11 | export function extractUiResourceUri(def: McpToolDef): string | undefined { |
| 12 | const meta = (def as { _meta?: { ui?: { resourceUri?: unknown } } })._meta |
| 13 | const uri = meta?.ui?.resourceUri |
| 14 | return typeof uri === 'string' ? uri : undefined |
| 15 | } |
| 16 | |
| 17 | export function mcpContentToTanstack( |
| 18 | content: Array<any>, |