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
Is your feature request related to a problem? Please describe.
Currently, MCP Client class in https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/index.ts throws Error when a capability isn't supported by a server. While building any MCP client applications, this makes it hard to know, when i call client.listPrompts and get back an exception - if the exception was because of an actual failure or because the capability isn't supported
Describe the solution you'd like
Client class should throw a custom exception like UnsupportedCapabilityException when the capability itself isn't supported - this makes it easy to write clients around this logic
Describe alternatives you've considered
Currently i am working around this by grepping the returned exception message to see if it contains the string does not support. This is very brittle and can break easily if the exception message changes
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, MCP Client class in https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/index.ts throws
Error
when a capability isn't supported by a server. While building any MCP client applications, this makes it hard to know, when i callclient.listPrompts
and get back an exception - if the exception was because of an actual failure or because the capability isn't supportedDescribe the solution you'd like
Client class should throw a custom exception like
UnsupportedCapabilityException
when the capability itself isn't supported - this makes it easy to write clients around this logicDescribe alternatives you've considered
Currently i am working around this by grepping the returned exception message to see if it contains the string
does not support
. This is very brittle and can break easily if the exception message changesThe text was updated successfully, but these errors were encountered: