Interface McpRateLimitContext
Immutable context supplied to an MCP rate limiter.
Implementations may combine the normalized endpoint path, the accepted identity's stable partition key, and the target to select local or distributed rate-limit state. Client-reported identity information is not a trusted partition key.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionReturns the identity accepted by request admission.Returns the resolved MCP endpoint.Returns the JSON-RPC method.Returns the resolved operation name, such as a tool name or task ID, when present.default @NonNull McpOperationTypeReturns the high-level type of the MCP operation being rate-limited.Returns the original Soklet request.Returns the rate-limit stage requesting this acquisition.
-
Method Details
-
getRequest
-
getEndpoint
-
getProtocolVersion
- Returns:
- exact validated protocol revision for this acquisition
-
getAdmissionIdentity
Returns the identity accepted by request admission.- Returns:
- admitted identity
-
getTarget
Returns the rate-limit stage requesting this acquisition.- Returns:
- request or tool target
-
getJsonRpcMethod
-
getOperationType
Returns the high-level type of the MCP operation being rate-limited.This classification is suitable for application branching. The exact validated wire value remains available from
getJsonRpcMethod().- Returns:
- operation type
-
getOperationName
Returns the resolved operation name, such as a tool name or task ID, when present.On session-enabled 2025 views, a request with malformed operation parameters can reach the request limiter with an empty operation name. Its parameter error is returned after admission, applicable request limiting and session binding. Branch on operation type without requiring this optional value.
- Returns:
- operation name, or the empty optional
-