Overview
Returns a function to read a resource from the originating MCP server. The request is proxied through the host. UseuseListServerResources to discover available resources first.
Wraps readServerResource
MCP Apps SDK reference
Import
Signature
ReadServerResourceParams
string
required
URI of the resource to read (e.g.
file:///path or a custom scheme like videos://intro).Returns
(params: ReadServerResourceParams) => Promise<ReadServerResourceResult | undefined>
Function to read a server resource by URI.
ReadServerResourceResult
Array<{ uri: string; mimeType?: string; text?: string; blob?: string }>
required
Resource contents returned by the server. Each item contains either
text (UTF-8 string) or blob (base64-encoded binary).