TsgcWSAPIServer_MCP › Methods › CheckClientCapability
Raises the error -32021 when the client of the request did not declare a capability.
procedure CheckClientCapability(const aSession: TsgcAI_MCP_Session; const aCapability: string);
Calls HasClientCapability and, when it returns False, raises a TsgcAI_MCP_Exception with the code -32021 (Missing required client capability). Raised inside a request handler, the exception is sent to the client as the JSON-RPC error of the request. See Protocol Versions.
MCPServer.CheckClientCapability(aSession, 'sampling');