View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/client/connectors/base.py
BaseConnector
method init
Initialize base connector with common attributes.ParametersSignatureOptional callback to handle sampling requests from servers.Optional callback to handle elicitation requests from servers.Optional callback to handle messages from servers.Optional callback to handle log messages from servers.Optional list of middleware to apply to requests.Optional initial list of roots to advertise to the server.Optional custom callback to handle roots/list requests.
method call_tool
Call an MCP tool with automatic reconnection handling.ParametersReturnsThe name of the tool to call.The arguments to pass to the tool.timeout seconds when calling tool
SignatureThe result of the tool call.
property prompts
Get the list of available prompts... deprecated::
This property is deprecated because it may return stale data when the server
sends list change notifications. Use `await list_prompts()’ instead to ensure
you always get the latest data.ReturnsSignature
property resources
Get the list of available resources... deprecated::
This property is deprecated because it may return stale data when the server
sends list change notifications. Use await list_resources() instead to ensure
you always get the latest data.ReturnsSignature