TsgcWSAPIClient_MCP › Methods › ListResources
Enumerates resource descriptors published by the server (resources/list).
procedure ListResources(const aCursor: string = '');
| Name | Type | Description |
|---|---|---|
aCursor | const string | Optional pagination cursor returned by a previous resources/list response. Leave empty to request the first page. |
Sends the JSON-RPC resources/list request. The reply is dispatched through OnMCPListResources as a TsgcAI_MCP_Response_ResourcesList instance describing each resource URI, MIME type, and annotations. The session must be in aimcpstInitialized state. Use the returned cursor to iterate large catalogues.
MCP.OnMCPListResources := procedure(Sender: TObject;
const aRequest: TsgcAI_MCP_Request_ResourcesList;
const aResponse: TsgcAI_MCP_Response_ResourcesList)
begin
MemoResources.Lines.Text := aResponse.Write;
end;
MCP.ListResources;