Metadata key for associating a resource URI with a tool call.
MCP servers include this key in tool call result metadata to indicate which
UI resource should be displayed for the tool. When hosts receive a tool result
containing this metadata, they resolve and render the corresponding App.
Note: This constant is provided for reference. MCP servers set this metadata
in their tool handlers; App developers typically don't need to use it directly.
Example: How MCP servers use this key (server-side, not in Apps)
// In an MCP server's tool handler: return { content: [{ type:"text", text:"Result" }], _meta: { [RESOURCE_URI_META_KEY]:"ui://weather/forecast" } };
Example: How hosts check for this metadata (host-side)
constresult = awaitmcpClient.callTool({ name:"weather", arguments: {} }); constuiUri = result._meta?.[RESOURCE_URI_META_KEY]; if (uiUri) { // Load and display the UI resource }
Metadata key for associating a resource URI with a tool call.
MCP servers include this key in tool call result metadata to indicate which UI resource should be displayed for the tool. When hosts receive a tool result containing this metadata, they resolve and render the corresponding App.
Note: This constant is provided for reference. MCP servers set this metadata in their tool handlers; App developers typically don't need to use it directly.