+
    Q(i                      J    R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt RR R llt	R# )	z)MCP server connection and tool discovery.)Client)StreamableHttpTransport)OAuth)extract_server_name_from_urlNc          
          V ^8  d   QhR\         R\         R,          R\        \         \         3,          R,          R\        \         \        3,          /# )   urlauthNheadersreturn)strdicttuplelist)formats   "\/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/mcp_skill/introspector.py__annotate__r   	   sP     +E +E	+E
*+E #s(^d"+E 39	+E    c                  "    V'       d   \        WR7      p\        V4      pMhV'       d,   VP                  4       R8X  d   \        V \        4       R7      pM5V'       d#   VP                  4       R9  d   \        WR7      pM\        V 4      pT;_uu_4       GRj  xL
  VP	                  4       G Rj  xL
 p\        V 4      V3uuRRR4      GRj  xL
  #  L; L% L	  + GRj  xL 
 '       g   i     R# ; i  \         d   p\        T4      P                  4       pRT9   g   RT9   g   RT9   d   \        RT  R	T 24      ThR
T9   g   RT9   g   RT9   d   \        RT  RT 24      Th\        RT  RT 24      ThRp?ii ; i5i)aO  Connect to an MCP server and list its tools.

Args:
    url: MCP server URL (HTTP/HTTPS)
    auth: Authentication - None for no auth, "oauth" for OAuth with
          persistent FileTree-backed token storage, or a string for Bearer token
    headers: Custom headers dict (e.g. {"x-api-key": "..."}). When
             provided, a StreamableHttpTransport is constructed directly
             so that headers are sent on every request.

Returns:
    Tuple of (server_name, list_of_tools)

Raises:
    ConnectionError: If cannot connect to server
    RuntimeError: If auth fails or other error
)r   r
   oauth)r	   NrefusedconnecttimeoutzCannot connect to z . Is the server running? Error: 401403r	   zAuthentication failed for z4. Check your API key or OAuth configuration. Error: zError connecting to z: )none )
r   r   lowerr   
list_toolsr   	Exceptionr   ConnectionErrorRuntimeError)r   r	   r
   	transportclienttoolse	error_msgs   &&&     r   connect_and_list_toolsr'   	   sM    ,E/CIII&Fdjjlg-Ceg.Fdjjl,6C+FC[F66 ++--E05u= 66- 666  EFLLN		!Y)%;yI?U!$6se;[\][^"_`fggI)!3v7J!;C5@tuvtwxy  @A  A1#b<=1DEs   F'C9 2C9 ;C9 CC9 C2C3CC9 CC9 FC9 CC9 C6	"C%#
C6	.C6	0C9 4F6C9 9FA9E==FF)NN)
__doc__fastmcpr   fastmcp.client.transportsr   mcp_skill.authr   mcp_skill.type_mapperr   r'    r   r   <module>r.      s     /  =   >+E +Er   