TsgcWSAPIClient_MCPMethods › RequestResource

RequestResource Method

Reads the contents of a resource identified by URI (resources/read).

Syntax

procedure RequestResource(const aUri: string);

Parameters

NameTypeDescription
aUriconst stringURI of the resource to read, as advertised by the server in its resources/list catalogue (for example file:///project/src/main.rs).

Remarks

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.

Example

MCP.RequestResource('file:///project/src/main.rs');

Back to Methods