TsgcWSAPIClient_MCP › Methods › RequestResource
Reads the contents of a resource identified by URI (resources/read).
procedure RequestResource(const aUri: string);
| Name | Type | Description |
|---|---|---|
aUri | const string | URI of the resource to read, as advertised by the server in its resources/list catalogue (for example file:///project/src/main.rs). |
Sends the JSON-RPC resources/read request. The server returns one or more resource entries, each carrying either textual content or Base64-encoded binary data. Responses are dispatched through OnMCPResponseResource and streamed chunks are surfaced through OnMCPStreamMessage when MCPOptions.Transport is aimcptrHttpStreamable. The session must be in aimcpstInitialized state.
MCP.RequestResource('file:///project/src/main.rs');