Expose the client initialization result
- Add getters for both MCP Sync/Async clients Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
This commit is contained in:
parent
ee2c891cca
commit
67de84b300
2 changed files with 16 additions and 0 deletions
|
|
@ -278,6 +278,14 @@ public class McpAsyncClient {
|
|||
this.transport.setExceptionHandler(this.initializer::handleException);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current initialization result.
|
||||
* @return the initialization result.
|
||||
*/
|
||||
public McpSchema.InitializeResult getCurrentInitializationResult() {
|
||||
return this.initializer.currentInitializationResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the server capabilities that define the supported features and functionality.
|
||||
* @return The server capabilities
|
||||
|
|
|
|||
|
|
@ -73,6 +73,14 @@ public class McpSyncClient implements AutoCloseable {
|
|||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current initialization result.
|
||||
* @return the initialization result.
|
||||
*/
|
||||
public McpSchema.InitializeResult getCurrentInitializationResult() {
|
||||
return this.delegate.getCurrentInitializationResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the server capabilities that define the supported features and functionality.
|
||||
* @return The server capabilities
|
||||
|
|
|
|||
Loading…
Reference in a new issue