Class McpElicitationLimitException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.rest.client.mcp.v20260728.McpElicitationLimitException
All Implemented Interfaces:
Serializable

Thrown by the client-side MRTR (SEP-2322) auto-resume helpers (McpClient.callToolWithElicitation(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, org.apache.juneau.rest.client.mcp.v20260728.McpElicitationHandler), McpClient.getPromptWithElicitation(java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, org.apache.juneau.rest.client.mcp.v20260728.McpElicitationHandler), McpClient.readResourceWithElicitation(java.lang.String, org.apache.juneau.rest.client.mcp.v20260728.McpElicitationHandler)) when a server keeps returning input_required pauses past the loop's configured maximum number of resume rounds.

This is a guard against an unbounded (or maliciously non-terminating) elicitation loop, distinct from a server-reported JSON-RPC error (which surfaces as McpException). It is an unchecked exception so it does not widen the throws clause of the helper methods beyond IOException; reaching it almost always indicates a server or handler that never converges rather than a condition ordinary caller code can recover from.

Since:
10.0.0
See Also:
  • Constructor Details

    • McpElicitationLimitException

      public McpElicitationLimitException(int maxRounds)
      Constructor.
      Parameters:
      maxRounds - The configured maximum number of resume rounds that was exceeded.
  • Method Details

    • getMaxRounds

      public int getMaxRounds()
      The configured maximum number of resume rounds that was exceeded.
      Returns:
      The max-rounds bound.