TsgcWSAPIServer_MCP › Methods › CheckClientCapability

CheckClientCapability Method

Raises the error -32021 when the client of the request did not declare a capability.

Syntax

procedure CheckClientCapability(const aSession: TsgcAI_MCP_Session; const aCapability: string);

Remarks

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.

Example

MCPServer.CheckClientCapability(aSession, 'sampling');

Back to Methods