MCPcopy Create free account
hub / github.com/TanStack/ai / extractUiResourceUri

Function extractUiResourceUri

packages/ai-mcp/src/tools.ts:11–15  ·  view source on GitHub ↗
(def: McpToolDef)

Source from the content-addressed store, hash-verified

9
10/** Reads the MCP Apps `_meta.ui.resourceUri` link from a tool def, if present. */
11export 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
17export function mcpContentToTanstack(
18 content: Array<any>,

Callers 1

toServerToolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected