You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b58d21c
Browse filesBrowse the repository at this point in the historyBrowse files
Polish the modern client's tool listing, failures and HTTP hooks
- listTools() asked the server for every page on each call. The client
now keeps the listing for its ttlMs and returns it while it's fresh.
listTools() returns a spec: list() serves the kept listing, and
skipCache() always asks the server. A listen stream that reports tool
changes drops the kept listing.
- The client's own failures (missing input handler, too many input
rounds, invalid result, lost response, timeout, lost listen stream,
HTTP error status) now extend McpClientException. Errors the server
answered remain McpException, so catching the two covers every
failure of a call.
- McpHttpRequestCustomizer.fromSync ran the customizer on whichever
thread sent the request, sometimes the caller's and sometimes an HTTP
client thread. It now runs on boundedElastic, as the authorization
error handler's fromSync does, so a customizer may block, for example
to fetch a token. Hooks get the call's identity only from the
McpTransportContext, on every attempt.
- McpHttpRequest and McpHttpResponseInfo can now be created outside the
SDK, with McpHttpRequest.builder(...) and McpHttpResponseInfo.of(...),
so a custom HTTP transport can call the request customizers and the
authorization error handler.
Signed-off-by: Dariusz Jedrzejczyk <2554306+chemicL@users.noreply.github.com>
Copy file name to clipboardExpand all lines: conformance-tests/client-modern/src/main/java/io/modelcontextprotocol/conformance/client/modern/ModernConformanceClient.java
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ public static void main(String[] args) {
0 commit comments