TsgcWSAPIClient_MCP › Methods › ListTools
Requests the catalogue of tools published by the server (tools/list).
procedure ListTools(const aCursor: string = '');
| Name | Type | Description |
|---|---|---|
aCursor | const string | Optional pagination cursor returned by a previous tools/list response. Leave empty to request the first page. |
Sends the JSON-RPC tools/list request. The reply is dispatched through OnMCPListTools as a TsgcAI_MCP_Response_ToolsList instance that exposes each tool Name, Title, Description and JSON schema. Use the nextCursor field of the response to iterate paginated catalogues. The session must be in aimcpstInitialized state; otherwise the call raises an exception.
MCP.OnMCPListTools := procedure(Sender: TObject;
const aRequest: TsgcAI_MCP_Request_ToolsList;
const aResponse: TsgcAI_MCP_Response_ToolsList)
begin
MemoLog.Lines.Text := aResponse.Write;
end;
MCP.ListTools;