+
    ÆÚjm±  ã                  óÒ  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIHtH	t	H
t
Ht ^ RIHtHt ^ RIHtHtHt ^ RIHtHtHtHtHt ^ RIt^ RIt^ RIt^ RIHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5 ^ RI6H7t7H8t8 ^ R	I9H:t: ^ R
I;H<t< ^ RI=H>t>H?t? ^ RI@HAtA ^ RIBHCtC ^ RIDHEtE ^ RIFHGtGHHtHHItIHJtJ ^ RIKHLtLHMtMHNtNHOtO ^ RIPHQtQHRtRHStSHTtTHUtUHVtVHWtWHXtX ^ RIYHZtZH[t[ ^ RI\H]t] ^ RI^H_t_H`t` ^ RI^Hatb ^ RIcHdtd ^ RIeHftf ^ RIgHhth ^ RIiHjtj ^ RIkHltlHmtm ^ RInHotoHptp ^ RIqHrtr ^ RIsHttt ^ RIuHvtv ]Pî                  ! ]x4      ty]R<,          ]z,          t{ ^dt|R]}R &    ]! R!4      t~]! R"4      t]! R#]R$7      t€]	]]{]�.]R%,          3,          t‚ R& R' ltƒR( R) lt„R* R+ lt…R, R- lt†R. R/ lt‡R0 R1 ltˆR2 R3 lt‰]! R4R57       ! R6 R74      4       tŠR8 R9 lt‹] ! R: R;4      4       tŒR# )=zFUnified MCP Client that wraps ClientSession with transport management.)ÚannotationsN)Ú	AwaitableÚCallableÚMappingÚSequence)ÚAbstractAsyncContextManagerÚAsyncExitStack)ÚKW_ONLYÚ	dataclassÚfield)ÚAnyÚFinalÚLiteralÚTypeVarÚcast)ÚHEADER_MISMATCHÚINVALID_PARAMSÚCacheableResultÚCallToolResultÚCompleteResultÚEmptyResultÚ	ErrorDataÚGetPromptResultÚImplementationÚInputRequestÚInputRequiredResultÚInputResponseÚInputResponsesÚListPromptsResultÚListResourcesResultÚListResourceTemplatesResultÚListToolsResultÚLoggingLevelÚPaginatedRequestParamsÚPromptReferenceÚReadResourceResultÚRequestParamsMetaÚResourceTemplateReferenceÚResultÚServerCapabilities)ÚHANDSHAKE_PROTOCOL_VERSIONSÚMODERN_PROTOCOL_VERSIONS)ÚValidationError)Ú
deprecated)Ú!DEFAULT_INPUT_REQUIRED_MAX_ROUNDSÚrun_input_required_driver)ÚInMemoryTransport)Únegotiate_auto)Ú	Transport)ÚCacheConfigÚ	CacheModeÚClientResponseCacheÚInMemoryResponseCacheStore)ÚClaimContextÚClientExtensionÚNotificationBindingÚResultClaim)ÚClientRequestContextÚClientSessionÚElicitationFnTÚIncomingMessageÚListRootsFnTÚ
LoggingFnTÚMessageHandlerFnTÚSamplingFnT)ÚStdioServerParametersÚstdio_client)Ústreamable_http_client)ÚServerEventÚSubscription)Úlisten)ÚServer)Ú	MCPServer)Úmodern_on_request)Úcreate_direct_dispatcher_pair)Ú
DispatcherÚProgressFnT)ÚMCPDeprecationWarningÚMCPError)Úvalidate_extension_identifier)ÚJSONRPCDispatcher)Úevent_to_notificationr   Ú_RELIST_PAGE_CAPÚ_TÚ_ResultTÚ_CacheableT)ÚboundúDispatcher[Any]c               ó    € V ^8„  d   QhRRRR/# )é   Ú	transportr2   ÚreturnÚ
_Connector© )Úformats   "Úˆ/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/mcp/client/client.pyÚ__annotate__rb   b   s   € ÷ ñ  )ð °
ñ ó    c                ó   a € R V 3R llpV# )zIConnector for the stream-backed paths (URL, user-supplied ``Transport``).c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   Ú
exit_stackr   Ú_modeÚConnectModeÚ_raise_exceptionsÚboolr]   rY   r_   )r`   s   "ra   rb   Ú(_connect_transport.<locals>.__annotate__e   s*   € ÷ <ñ < .ð <¸ð <ÐY]ð <Ðbqñ <rc   c              “  ó\   <"  € V P                  S4      G R j  x€L
 w  r4\        W44      #  L5i©N)Úenter_async_contextrR   )rf   rg   ri   Úread_streamÚwrite_streamr\   s   &&&  €ra   ÚconnectÚ#_connect_transport.<locals>.connecte   s-   øé € Ø*4×*HÑ*HÈÓ*S×$SÑ!ˆÜ  Ó;Ð;ñ %Tùs   ƒ,˜*™,r_   )r\   rq   s   f ra   Ú_connect_transportrs   b   s   ø€ ÷<ð <ð €Nrc   c               ó    € V ^8„  d   QhRRRR/# )r[   ÚserverzServer[Any]r]   r^   r_   )r`   s   "ra   rb   rb   l   s   € ÷ ñ ˜Kð ¨Jñ rc   c                ó   a € R V 3R llpV# )züConnector for an in-process ``Server``: legacy mode drives the stream loop via
``InMemoryTransport``; any other mode drives the modern per-request path through a
``DirectDispatcher`` peer pair (no streams, no JSON-RPC framing, no initialize handshake).c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   rf   r   Úmoderh   Úraise_exceptionsrj   r]   rY   r_   )r`   s   "ra   rb   Ú%_connect_inproc.<locals>.__annotate__q   s*   € ÷ ñ  .ð ¸ð ÐW[ð Ð`oñ rc   c              “  óø  <"  € VR 8X  d4   \        SVR7      pV P                  V4      G Rj  x€L
 w  rE\        WE4      # V P                  SP                  S4      4      G Rj  x€L
 p\	        VR7      w  rxV P                  \
        P                  ! 4       4      G Rj  x€L
 p	V P                  VP                  4       \        SV4      p
V	P                  VP                  V
\        4      G Rj  x€L
  V#  LÅ L’ LZ L5i)Úlegacy)ry   N)Úraise_handler_exceptions)r0   rn   rR   ÚlifespanrL   ÚanyioÚcreate_task_groupÚcallbackÚcloserK   ÚstartÚrunÚ _no_inbound_client_notifications)rf   rx   ry   r\   ro   rp   Úlifespan_stateÚclient_dispÚserver_dispÚtgÚ
on_requestru   s   &&&        €ra   rq   Ú _connect_inproc.<locals>.connectq   sÕ   øé € Ø�8ÔÜ)¨&ÐCSÔTˆIØ.8×.LÑ.LÈYÓ.W×(WÑ%ˆKÜ$ [Ó?Ð?Ø)×=Ñ=¸f¿o¹oÈfÓ>UÓV×VˆÜ#@ÐZjÔ#kÑ ˆØ×1Ñ1´%×2IÒ2IÓ2KÓL×LˆØ×Ñ˜K×-Ñ-Ô.Ü& v¨~Ó>ˆ
Ø�h‰h�{—‘¨
Ô4TÓU×UÐUØÐñ )XáVáLñ 	VùsF   ƒ)C:¬C2­4C:Á!C4Á"9C:ÂC6ÂAC:Ã+C8Ã,C:Ã4C:Ã6C:Ã8C:r_   )ru   rq   s   f ra   Ú_connect_inprocrŒ   l   s   ø€ ÷
ð ð €Nrc   c               ó    € V ^8„  d   QhRRRR/# )r[   Úvaluez	_T | Noner]   rU   r_   )r`   s   "ra   rb   rb   �   s   € ÷ 	ñ 	�ið 	 Bñ 	rc   c                ó$   € V f   \        R4      hV # )aK  Narrow a post-handshake session attribute from ``T | None`` to ``T``.

``Client.__aenter__`` only assigns ``_session`` after the handshake succeeds, so inside
``async with Client(...)`` these attributes are always populated; the ``.session`` gate
raises before this is reached otherwise. The guard exists for pyright, not runtime.
ú3Client must be used within an async context manager)ÚRuntimeError)rŽ   s   &ra   Ú
_connectedr’   �   s   € ð ‚}ÜÐPÓQÐQØ€Lrc   c               ó    € V ^8„  d   QhRRRR/# )r[   ÚurlÚstrr]   r_   )r`   s   "ra   rb   rb   �   s   € ÷ Bñ B˜ð B ñ Brc   c                ó*  € V P                  R4      pVR8X  d   V # V^,           p\        V 4      pR F(  pV P                  WB4      ;pR8w  g   K  \        W54      pK*  	  WV pRV9  d   V # V RV VP                  R4      ^,          ,           WR ,           # )z´Drop any userinfo from the URL's authority component; byte-exact otherwise.

Credentials must not enter cache-key material; any further normalization could merge distinct servers.
z//z/?#Ú@Néÿÿÿÿ)ÚfindÚlenÚminÚ
rpartition)r”   Úseprƒ   ÚendÚ	delimiterÚfoundÚ	authoritys   &      ra   Ú_strip_userinfor¢   �   sš   € ð �(‰(�4‹.€CØ
ˆb„yØˆ
Ø�!�G€EÜ
ˆc‹(€CÛˆ	Ø—X‘X˜iÓ/Ð/ˆE°BÖ6Ü�c“/ŠCñ ð ˜#�€IØ
�)ÔØˆ
Øˆv�ˆ;˜×-Ñ-¨cÓ2°1Õ5Õ5¸¸D¸	ÕAÐArc   c               ó$   € V ^8„  d   QhRRRRRR/# )r[   Úcacher5   Úuser_handlerúMessageHandlerFnT | Noner]   rA   r_   )r`   s   "ra   rb   rb   ¡   s$   € ÷ ñ Ð%8ð ÐH`ð Ðevñ rc   c                ó   a a€ R V V3R llpV# )zMWrap the session message handler with cache eviction on server notifications.c               ó    € V ^8„  d   QhRRRR/# )r[   Úmessager>   r]   ÚNoner_   )r`   s   "ra   rb   Ú/_evicting_message_handler.<locals>.__annotate__¤   s   € ÷ 
.ñ 
.˜ð 
.°4ñ 
.rc   c              “  óT  <"  € \        V \        P                  4      '       d    SP                  V 4      G R j  x€L
  Se   S! V 4      G R j  x€L
  R # \        P                  P                  4       G R j  x€L
  R #  LB  \         d    \
        P                  R4        Lbi ; i LV L05i)NzCResponse cache eviction failed; the notification is still delivered)
Ú
isinstanceÚtypesÚServerNotificationÚevict_for_notificationÚ	ExceptionÚloggerÚ	exceptionr   ÚlowlevelÚ
checkpoint)r©   r¤   r¥   s   &€€ra   ÚhandlerÚ*_evicting_message_handler.<locals>.handler¤   s�   øé € Ü�gœu×7Ñ7×8Ò8ðhØ×2Ñ2°7Ó;×;Ð;ð Ò#Ù˜wÓ'×'Ò'ô —.‘.×+Ñ+Ó-×-Ò-ñ <øÜô hÜ× Ñ Ð!fÖgðhúñ (ñ .ùsU   ƒ!B(¥A> ¹A<ºA> ¾B(ÁB$Á'B(Á5B&Á6B(Á<A> Á> B!ÂB(Â B!Â!B(Â&B(r_   )r¤   r¥   r¶   s   ff ra   Ú_evicting_message_handlerr¸   ¡   s   ù€ ÷
.ñ 
.ð €Nrc   c               ó    € V ^8„  d   QhRRRR/# )r[   Úprotocol_versionr•   r]   ztypes.DiscoverResultr_   )r`   s   "ra   rb   rb   ³   s   € ÷ ñ ¨3ð Ð3Gñ rc   c                ó`   € \         P                  ! V .\         P                  ! 4       R ^ RR7      # )ÚcompleteÚpublic)Úsupported_versionsÚcapabilitiesÚresult_typeÚttl_msÚcache_scope)r®   ÚDiscoverResultr)   )rº   s   &ra   Ú_synthesize_discoverrÄ   ³   s0   € Ü×ÒØ,Ð-Ü×-Ò-Ó/ØØØôð rc   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   Ú_dctxr   Ú_methodr•   Ú_paramszMapping[str, Any] | Noner]   rª   r_   )r`   s   "ra   rb   rb   ½   s*   € ÷ ñ °#ð Àð ÐNfð Ðkoñ rc   c              ƒ  ó   "  € R# 5i)uÒ  Server-side inbound ``OnNotify`` for the modern in-process path â€” receives nothing.

At 2026-07-28 the spec defines no clientâ†’server notifications: ``initialized`` and
``roots/list_changed`` are removed, and cancellation is structural (anyio scope cancel
through the direct await, not a notify). Serverâ†’client notifications (progress, log
messages) flow the other way via the per-request ``DispatchContext`` into the client's
callbacks, and are not seen here.
Nr_   )rÆ   rÇ   rÈ   s   &&&ra   r…   r…   ½   s   é ‚ ùs   ‚T)Úfrozenc                  óD   € ] tR t^Èt$ RtR]R&   R]R&   R]R&   R]R	&   R
tR# )Ú_FoldedExtensionszN`Client.extensions` instances folded into the shapes `ClientSession` consumes.z dict[str, dict[str, Any]] | NoneÚadz.dict[str, tuple[ResultClaim[Any], ...]] | NoneÚclaimsz+tuple[NotificationBinding[Any], ...] | NoneÚbindingsz'Mapping[type[Result], ResultClaim[Any]]Úby_modelr_   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Ú__static_attributes__r_   rc   ra   rÌ   rÌ   È   s   ‡ áXà(Ó(Ø:Ó:Ø9Ó9Ø5×5rc   rÌ   c               ó    € V ^8„  d   QhRRRR/# )r[   Ú
extensionsú Sequence[ClientExtension] | Noner]   rÌ   r_   )r`   s   "ra   rb   rb   Ò   s    € ÷ 5pñ 5pÐ!Að 5pÐFWñ 5prc   c                ó  € \        V \        4      '       d   \        R4      hV '       g   \        RRR/ R7      # / p/ p. p/ p/ p/ pV  EF�  p\	        VRR4      pVf"   \        \        V4      P                   R24      h\        V\        V4      P                  R7       W�9   d   \        RV: R24      hVP                  4       W&   \        VP                  4       4      p	V	 FY  p
V
P                  pWµ9   d3   W[,          pWÈ8X  d   R	V: R
2M
RV: RV: R2p\        V RV: R24      hW…V&   W¤V
P                  &   K[  	  V	'       d   W’V&   VP                  4        Fy  pVP                  V9   dG   WnP                  ,          pWÈ8X  d   R	V: R2M
RV: RV: R2p\        V RVP                  : R24      hW†VP                  &   VP!                  V4       K{  	  EK’  	  \        Y;'       g    R\        V4      ;'       g    RVR7      # )z^Fold extension contributions at construction, naming both owners on duplicate tags or methods.z˜extensions= takes a sequence of ClientExtension instances. The mapping form was replaced: use advertise(identifier, settings) for advertise-only entriesN)rÍ   rÎ   rÏ   rÐ   Ú
identifierz… has no `identifier`; a ClientExtension must set the `identifier` class attribute (or assign one in `__init__`) before it can be used)Úownerzextension identifier z is passed more than oncez
extension z claimszextensions z and z both claimz resultType z'; a wire tag can have only one resolverz bindsz
 both bindz notification method z%; a method can have only one observer)r­   r   Ú	TypeErrorrÌ   ÚgetattrÚ
ValueErrorÚtyperÑ   rQ   ÚsettingsÚtuplerÎ   rÀ   ÚmodelÚnotificationsÚmethodÚappend)rÙ   rÍ   rÎ   rÏ   rÐ   Úclaim_ownersÚbinding_ownersÚ	extensionrÜ   Úextension_claimsÚclaimÚtagrÝ   ÚbothÚbindings   &              ra   Ú_fold_extensionsrð   Ò   s6  € ä�*œg×&Ò&ÜðWó
ð 	
÷ Ü  D°ÀÈrÔRÐRØ$&€BØ68€FØ/1€HØ57€HØ#%€LØ%'€NÜˆ	Ü˜Y¨°dÓ;ˆ
ØÒÜÜ˜	“?×+Ñ+Ð,ð -cð cóð ô 	& j¼¸Y»×8PÑ8PÕQØÔÜÐ4°Z±NÐB[Ð\Ó]Ð]Ø"×+Ñ+Ó-ˆ‰Ü  ×!1Ñ!1Ó!3Ó4ÐÛ%ˆEØ×#Ñ#ˆCØÔ"Ø$Õ)�ð Ô*ð ! ¡¨gÑ6à'¨¡y°°j±^À;ÐOð ô
 ! D 6¨°c±WÐ<cÐ!dÓeÐeØ *˜Ñà$)�U—[‘[Ó!ñ &÷ Ø!1�:ÑØ ×.Ñ.Ö0ˆGØ�~‰~ Ô/Ø&§~¡~Õ6�ð Ô*ð ! ¡¨fÑ5à'¨¡y°°j±^À:ÐNð ô
 ! D 6Ð)>¸w¿~¹~Ñ>PÐPuÐ!vÓwÐwØ-7˜7Ÿ>™>Ñ*Ø�O‰O˜GÖ$ô 1ñ7  ôL  ¯>¨>°TÄEÈ(ÃO×D[ÐD[ÐW[ÐfnÔoÐorc   c                  óÊ  € ] tR tRt$ RtR]R&    R]R&   RtR]R	&    R
tR]R&    R
tR]R&    R
t	R]R&    R
t
R]R&    R
tR]R&    R
tR]R&    R
tR]R&    R
tR]R&    RtR]R&    R
tR]R&    R
tR ]R!&    ]tR"]R#&    R
tR$]R%&    ]! ]R&7      tR']R(&    ]! RRR)7      tR]R*&   ]! RR
R)7      tR+]R,&   ]! RR
R)7      tR-]R.&   ]! RRRR/7      tR0]R1&   ]! RR
RRR27      tR3]R4&   ]! RRRR/7      tR5]R6&   R7 R8 ltR9 R: ltR; R< lt R= R> lt!]"R? R@ l4       t#]"RA RB l4       t$]"RC RD l4       t%]"RE RF l4       t&]"RG RH l4       t'](! RI])RJ7      RKR
/RL RM ll4       t*](! RN])RJ7      R‚RO RP ll4       t+](! RQ])RJ7      RKR
/RR RS ll4       t,RTR
/RU RV llt-RWR
RKR
RXRY/RZ R[ llt.RWR
RKR
RXRY/R\ R] llt/R^R
R_R
RKR
RXRY/R` Ra llt0RbRRcRRdRReRƒ/Rf Rg llt1Rh Ri lt2](! Rj])RJ7      RKR
/Rk Rl ll4       t3](! Rm])RJ7      RKR
/Rn Ro ll4       t4R„R^R
R_R
RKR
/Rp Rq lllt5RWR
RKR
RXRY/Rr Rs llt6R…R^R
R_R
RKR
/Rt Ru lllt7Rv Rw lt8R…Rx Ry llt9RWR
RKR
RXRY/Rz R{ llt:R| R} lt;](! R~])RJ7      R R€ l4       t<R�t=R
# )†ÚClienti
  a#  A high-level MCP client for connecting to MCP servers.

Pass a URL string (Streamable HTTP), a `StdioServerParameters` (launch the command as a
subprocess and talk over its stdin/stdout), any `Transport`, or - in tests - a `Server` or
`MCPServer` instance to connect to it in-process.

Example:
    ```python
    import asyncio

    from mcp import Client

    async def main():
        async with Client("http://localhost:8000/mcp") as client:
            result = await client.call_tool("add", {"a": 1, "b": 2})

    asyncio.run(main())
    ```
zAServer[Any] | MCPServer | Transport | StdioServerParameters | strru   r	   Ú_Frj   ry   Núfloat | NoneÚread_timeout_secondszSamplingFnT | NoneÚsampling_callbackztypes.SamplingCapability | NoneÚsampling_capabilitieszListRootsFnT | NoneÚlist_roots_callbackzLoggingFnT | NoneÚlogging_callbackzLoggingLevel | NoneÚ	log_levelr¦   Úmessage_handlerúImplementation | NoneÚclient_infoÚautorh   rx   ztypes.DiscoverResult | NoneÚprior_discoverzElicitationFnT | NoneÚelicitation_callbackÚintÚinput_required_max_roundsrÚ   rÙ   )Údefault_factoryzCacheConfig | Noner¤   )ÚinitÚdefaultÚ_enteredzClientSession | NoneÚ_sessionzAsyncExitStack | NoneÚ_exit_stack)r  ÚreprÚcomparer^   Ú_connect)r  r  r	  r
  zClientResponseCache | NoneÚ_response_cacherÌ   Ú_folded_extensionsc               ó   € V ^8„  d   QhRR/# ©r[   r]   rª   r_   )r`   s   "ra   rb   ÚClient.__annotate__|  s   € ÷ 0ñ 0˜tñ 0rc   c           
     	ó  a € S P                   R
9  di   S P                   \        9  dT   S P                   \        9   d   RS P                   : R2MRp\        R\	        \        4       RS P                   : V 24      h\        S P                  4      S n        S P                  p\        V\        4      '       d   VP                  p\        V\        4      '       d   \        V4      S n        Mp\        V\        4      '       d   \!        \#        V4      4      S n        M@\        V\$        4      '       d   \!        \'        V4      4      S n        M\!        V4      S n        S P(                  Ee%   S P(                  pVP*                  pVf6   \        S P                  \        4      '       d   \-        S P                  4      pVf9   VP.                  e   \        R4      h\0        P2                  ! 4       P4                  p\7        VP.                  e   VP.                  M	\9        4       VP:                  \<        P>                  ! VPA                  4       4      PC                  4       VPD                  VPF                  VPH                  V 3R lR	7      S n%        R# R# )r|   z (z/ is a handshake-era version; use mode='legacy')Ú z)mode must be 'legacy', 'auto', or one of z; got Nzéa custom cache store requires CacheConfig.target_id when the server is not a URL: in-process servers and Transport instances get a random per-client identity, so their entries in a shared store could never be served to another clientc                 óP   <€ S P                   e   S P                   P                  # R # rm   )r  rº   ©Úselfs   €ra   Ú<lambda>Ú&Client.__post_init__.<locals>.<lambda>«  s!   ø€ ÈTÏ]É]ÒMf¨4¯=©=×+IÑ+IÐ+pÐlpÐ+prc   )ÚstoreÚ	partitionÚarm_idÚdefault_ttl_msÚclockÚshare_publicÚnegotiated_version©r|   rþ   )&rx   r+   r*   rà   Úlistrð   rÙ   r  ru   r­   rJ   Ú_lowlevel_serverrI   rŒ   r  r•   rs   rE   rC   rD   r¤   Ú	target_idr¢   r  ÚuuidÚuuid4Úhexr5   r6   r  ÚhashlibÚsha256ÚencodeÚ	hexdigestr  r  r  r  )r  ÚhintÚsrvÚconfigr"  s   f    ra   Ú__post_init__ÚClient.__post_init__|  sõ  ø€ Ø�9‰9Ð.Ô.°4·9±9ÔD\Ô3\ð —9‘9Ô ;Ô;ð �T—Y‘Y‘MÐ!PÑQàð ô
 Ø;¼DÔAYÓ<ZÐ;[Ð[aÐbf×bkÑbkÑanÐosÐntÐuóð ô #3°4·?±?Ó"CˆÔà�k‰kˆÜ�cœ9×%Ò%Ø×&Ñ&ˆCÜ�cœ6×"Ò"Ü+¨CÓ0ˆD�MÜ˜œS×!Ò!Ü.Ô/EÀcÓ/JÓKˆD�MÜ˜Ô2×3Ò3Ü.¬|¸CÓ/@ÓAˆD�Mä.¨sÓ3ˆDŒMà�:‰:Ó!Ø—Z‘ZˆFà×(Ñ(ˆIØÒ ¤Z°·±¼S×%AÒ%AÜ+¨D¯K©KÓ8�	ØÒ Ø—<‘<Ò+Ü$ðbóð ô
 !ŸJšJ›L×,Ñ,�	Ü#6Ø&,§l¡lÒ&>�f—l’lÔD^ÓD`Ø ×*Ñ*Ü—~’~ i×&6Ñ&6Ó&8Ó9×CÑCÓEØ%×4Ñ4Ø—l‘lØ#×0Ñ0ä#pô	$ˆDÖ ñ "rc   c               ó    € V ^8„  d   QhRRRR/# )r[   rf   r   r]   r<   r_   )r`   s   "ra   rb   r  ®  s   € ÷ 
ñ 
¨~ð 
À-ñ 
rc   c              ƒ  ó&  "  € V P                  WP                  V P                  4      G Rj  x€L
 pV P                  pV P                  e!   \        V P                  V P                  4      p\        VV P                  V P                  V P                  V P                  V P                  V P                  VV P                  V P                  V P                  P                   V P                  P"                  V P                  P$                  R7      #  Lâ5i)zDEnter the resolved connector and return an un-entered ClientSession.N)Ú
dispatcherrõ   rö   r÷   rø   rù   rú   rû   rý   r   rÙ   Úresult_claimsÚnotification_bindings)r  rx   ry   rû   r  r¸   r<   rõ   rö   r÷   rø   rù   rú   rý   r   r  rÍ   rÎ   rÏ   )r  rf   r1  rû   s   &&  ra   Ú_build_sessionÚClient._build_session®  sÝ   é € àŸ=™=¨·Y±YÀ×@UÑ@UÓV×Vˆ
Ø×.Ñ.ˆØ×ÑÒ+Ü7¸×8LÑ8LÈd×NbÑNbÓcˆOÜØ!Ø!%×!:Ñ!:Ø"×4Ñ4Ø"&×"<Ñ"<Ø $× 8Ñ 8Ø!×2Ñ2Ø—n‘nØ+Ø×(Ñ(Ø!%×!:Ñ!:Ø×.Ñ.×1Ñ1Ø×1Ñ1×8Ñ8Ø"&×"9Ñ"9×"BÑ"Bô
ð 	
ñ	 Wùs   ‚*D¬D­C#Dc               ó   € V ^8„  d   QhRR/# )r[   r]   rò   r_   )r`   s   "ra   rb   r  Ä  s   € ÷ ñ  &ñ rc   c              ƒ  óª  "  € V P                   '       d   \        R4      hRV n         \        4       ;_uu_4       GRj  x€L
 pV P                  V4      G Rj  x€L
 pVP	                  V4      G Rj  x€L
 pV P
                  R8X  d   VP                  4       G Rj  x€L
  M]V P
                  R8X  d   \        V4      G Rj  x€L
  M8TP                  V P                  ;'       g    \        V P
                  4      4       W n        VP                  4       V n        T uuRRR4      GRj  x€L
  #  Lì LÕ L¾ L— Lt L  + GRj  x€L 
 '       g   i     R# ; i5i)z Enter the async context manager.z)Client is already entered; cannot reenterTNr|   rþ   )r  r‘   r   r4  rn   rx   Ú
initializer1   Úadoptrÿ   rÄ   r  Úpop_allr  )r  rf   Úsessions   &  ra   Ú
__aenter__ÚClient.__aenter__Ä  só   é € à�=�=ˆ=ÜÐJÓKÐKØˆŒä!×#×#Ô# zØ ×/Ñ/°
Ó;×;ˆGØ&×:Ñ:¸7ÓC×CˆGà�y‰y˜HÔ$Ø×(Ñ(Ó*×*Ñ*Ø—‘˜fÔ$Ü$ WÓ-×-Ñ-à—‘˜d×1Ñ1×TÐTÔ5IÈ$Ï)É)Ó5TÔUð $ŒMØ)×1Ñ1Ó3ˆDÔØ÷# $×#Ô#Ù;ÙCñ +á-÷ $×#×#Ó#üs™   ‚;E½D*¾EÁD6ÁD,ÁD6Á/D.Á0(D6ÂD0Â$D6Â=D2Â>"D6Ã!6D6ÄEÄ$D4Ä%EÄ,D6Ä.D6Ä0D6Ä2D6Ä4EÄ6E	Ä<D?Ä=
E	ÅE	Å
	Ec               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   Úexc_typeztype[BaseException] | NoneÚexc_valzBaseException | NoneÚexc_tbr   r]   rª   r_   )r`   s   "ra   rb   r  Ý  s,   € ÷ ñ Ð(Bð ÐMað Ðknð Ðswñ rc   c              ƒ  óŒ   "  € V P                   '       d%   V P                   P                  WV4      G Rj  x€L
  RV n        R#  L5i)zExit the async context manager.N)r  Ú	__aexit__r  )r  r?  r@  rA  s   &&&&ra   rC  ÚClient.__aexit__Ý  s:   é € à××ÐØ×"Ñ"×,Ñ,¨XÀÓG×GÐGØˆŽñ Hùs   ‚2A´AµAc               ó   € V ^8„  d   QhRR/# )r[   r]   r<   r_   )r`   s   "ra   rb   r  ä  s   € ÷ 
ñ 
˜ñ 
rc   c                óL   € V P                   f   \        R4      hV P                   # )zºGet the underlying ClientSession.

This provides access to the full ClientSession API for advanced use cases.

Raises:
    RuntimeError: If accessed before entering the context manager.
r�   )r  r‘   r  s   &ra   r;  ÚClient.sessionã  s$   € ð �=‰=Ò ÜÐTÓUÐUØ�}‰}Ðrc   c               ó   € V ^8„  d   QhRR/# )r[   r]   r•   r_   )r`   s   "ra   rb   r  ö  s   € ÷ 9ñ 9 #ñ 9rc   c                ó@   € \        V P                  P                  4      # )zUNegotiated protocol version (set by initialize/discover/adopt during ``__aenter__``).)r’   r;  rº   r  s   &ra   rº   ÚClient.protocol_versionõ  s   € ô ˜$Ÿ,™,×7Ñ7Ó8Ð8rc   c               ó   € V ^8„  d   QhRR/# )r[   r]   rü   r_   )r`   s   "ra   rb   r  û  s   € ÷ (ñ (Ð2ñ (rc   c                ó.   € V P                   P                  # )a  Server name/version, or `None` when the server did not identify itself.

Legacy connections always carry it (`InitializeResult.serverInfo` is
required); on 2026-era connections the `_meta` `serverInfo` stamp is
optional, so an anonymous server reads as `None`.
)r;  Úserver_infor  s   &ra   rM  ÚClient.server_infoú  s   € ð �|‰|×'Ñ'Ð'rc   c               ó   € V ^8„  d   QhRR/# )r[   r]   r)   r_   )r`   s   "ra   rb   r    s   € ÷ <ñ <Ð%7ñ <rc   c                ó@   € \        V P                  P                  4      # )zMServer capabilities (set by initialize/discover/adopt during ``__aenter__``).)r’   r;  Úserver_capabilitiesr  s   &ra   rQ  ÚClient.server_capabilities  s   € ô ˜$Ÿ,™,×:Ñ:Ó;Ð;rc   c               ó   € V ^8„  d   QhRR/# )r[   r]   ú
str | Noner_   )r`   s   "ra   rb   r  
  s   € ÷ )ñ )˜jñ )rc   c                ó.   € V P                   P                  # )z*Server-provided instructions text, if any.)r;  Úinstructionsr  s   &ra   rV  ÚClient.instructions	  s   € ð �|‰|×(Ñ(Ð(rc   zLping is removed as of 2026-07-28; the method only works under mode='legacy'.)ÚcategoryÚmetac               ó    € V ^8„  d   QhRRRR/# )r[   rY  úRequestParamsMeta | Noner]   r   r_   )r`   s   "ra   rb   r    s   € ÷ 7ñ 7Ð'?ð 7È;ñ 7rc   c             ƒ  óV   "  € V P                   P                  VR7      G Rj  x€L
 #  L5i)z"Send a ping request to the server.©rY  N)r;  Ú	send_ping)r  rY  s   &$ra   r^  ÚClient.send_ping  s%   é € ð —\‘\×+Ñ+°Ð+Ó6×6Ð6Ñ6ùó   ‚ )¢'£)z\Client-to-server progress is deprecated as of 2026-07-28; progress is server-to-client only.c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r[   Úprogress_tokenz	str | intÚprogressÚfloatÚtotalrô   r©   rT  r]   rª   r_   )r`   s   "ra   rb   r    s<   € ÷ 
ñ 
à!ð
ð ð
ð ð	
ð
 ð
ð 
ñ
rc   c              ƒ  ó`   "  € V P                   P                  VVVVR7      G Rj  x€L
  R#  L5i)z+Send a progress notification to the server.)rb  rc  re  r©   N)r;  Úsend_progress_notification)r  rb  rc  re  r©   s   &&&&&ra   rg  Ú!Client.send_progress_notification  s4   é € ð �l‰l×5Ñ5Ø)ØØØð	 6ó 
÷ 	
ô 	
ùs   ‚#.¥,¦.zAThe logging capability is deprecated as of 2026-07-28 (SEP-2577).c               ó$   € V ^8„  d   QhRRRRRR/# )r[   Úlevelr"   rY  r[  r]   r   r_   )r`   s   "ra   rb   r  *  s(   € ÷ Lñ L¨\ð LÐD\ð LÐhsñ Lrc   c             ƒ  óV   "  € V P                   P                  WR7      G Rj  x€L
 #  L5i)z$Set the logging level on the server.)rj  rY  N)r;  Úset_logging_level)r  rj  rY  s   &&$ra   rl  ÚClient.set_logging_level)  s%   é € ð —\‘\×3Ñ3¸%Ð3ÓK×KÐKÑKùr`  Úabsorbc               ó4   € V ^8„  d   QhRRRRRRRRR	R
RRRR/# )r[   ræ   r•   ÚcursorrT  rY  r[  Ú
cache_moder4   Úsendz$Callable[[], Awaitable[_CacheableT]]rn  z+Callable[[_CacheableT], _CacheableT] | Noner]   rW   r_   )r`   s   "ra   rb   r  .  sP   € ÷ %ñ %àð%ð ð	%ð
 'ð%ð ð%ð 3ð%ð <ð%ð 
ñ%rc   c             ƒ  óN  "  € V P                   pVe   VR8X  d   V! 4       G Rj  x€L
 # V P                  pVe
   VR8X  d   RpVe    V! 4       G Rj  x€L
 # VR8X  d=   VP                  VR4      G Rj  x€L
 ;p
e   \        \        V
4      pVf   V# V! V4      # VP                  VR4      pV! 4       G Rj  x€L
 pVP                  VRWÜV4      G Rj  x€L
  V#  L³ Lˆ  \         d6   p	T	P                  \        8X  d   TP                  T4      G Rj  x€L 
  h Rp	?	ii ; i L¬ Lk LQ5i)z–Serve one of the four list verbs through the response cache.

`absorb` (tools/list only) re-applies session-side derived state to a served cache hit.
NÚbypassÚuseÚrefreshr  )r  r;  rP   Úcoder   Úevict_methodÚreadr   rW   ÚcaptureÚwrite)r  ræ   rp  rY  rq  rr  rn  r¤   ró   ÚeÚhitÚservedÚgenÚresults   &&$$$$$       ra   Ú_cached_fetchÚClient._cached_fetch.  s  é € ð ×$Ñ$ˆØŠ=˜J¨(Ô2Ù›—<Ðà�L‰LˆØÒ 
¨eÔ 3à"ˆJØÒðÙ!›V—|Ð#ð
 ˜Ô°·±¸FÀBÓ1G×+GÐ$G CÒ#Täœ+ sÓ+ˆFØ#š^�6Ð?±¸³Ð?Ø�m‰m˜F BÓ'ˆÙ“v—ˆØ�k‰k˜& " f°:Ó>×>Ð>Øˆñ+  ñ $øÜô Ø—6‘6œ^Ô+Ø×,Ñ,¨VÓ4×4Ñ4Øûðúñ ,Hñ
 Ù>ùs‚   ‚"D%¤C¥!D%Á
C ÁCÁC ÁD%Á2DÁ3AD%Â5D!Â6D%ÃD#ÃD%ÃC ÃDÃ')DÄDÄDÄDÄD%Ä!D%Ä#D%rp  rq  ru  c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   rp  rT  rY  r[  rq  r4   r]   r   r_   )r`   s   "ra   rb   r  U  s4   € ÷ 
ñ 
ð ð
ð 'ð	
ð
 ð
ð 
ñ
rc   c          	   ƒ  ó\   a aa"  € S P                  RSSVVVV 3R lR7      G Rj  x€L
 #  L5i)z)List available resources from the server.zresources/listc                 óR   <€ SP                   P                  \        S SR 7      R7      # ©)rp  Ú_meta)Úparams)r;  Úlist_resourcesr#   ©rp  rY  r  s   €€€ra   r  Ú'Client.list_resources.<locals>.<lambda>b  s!   ø€ ˜Ÿ™×4Ñ4Ô<RÐZ`ÐhlÔ<mÐ4Ônrc   ©rp  rY  rq  rr  N©r�  ©r  rp  rY  rq  s   fdd$ra   r‰  ÚClient.list_resourcesU  s9   úé € ð ×'Ñ'ØØØØ!Þnð (ó 
÷ 
ð 	
ñ 
ùó   … ,¥*¦,c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   rp  rT  rY  r[  rq  r4   r]   r    r_   )r`   s   "ra   rb   r  e  s4   € ÷ 
ñ 
ð ð
ð 'ð	
ð
 ð
ð 
%ñ
rc   c          	   ƒ  ó\   a aa"  € S P                  RSSVVVV 3R lR7      G Rj  x€L
 #  L5i)z2List available resource templates from the server.zresources/templates/listc                 óR   <€ SP                   P                  \        S SR 7      R7      # r†  )r;  Úlist_resource_templatesr#   rŠ  s   €€€ra   r  Ú0Client.list_resource_templates.<locals>.<lambda>r  s!   ø€ ˜Ÿ™×=Ñ=ÔE[ÐciÐquÔEvÐ=Ôwrc   rŒ  Nr�  rŽ  s   fdd$ra   r”  ÚClient.list_resource_templatese  s9   úé € ð ×'Ñ'Ø&ØØØ!Þwð (ó 
÷ 
ð 	
ñ 
ùr�  Úinput_responsesÚrequest_statec               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r[   Úurir•   r—  úInputResponses | Noner˜  rT  rY  r[  rq  r4   r]   r%   r_   )r`   s   "ra   rb   r  u  sF   € ÷ >>ñ >>àð>>ð /ð	>>ð
 "ð>>ð 'ð>>ð ð>>ð 
ñ>>rc   c             ƒ  ó°  a aa"  € R VV V3R llpVRJ;'       g    VRJpV'       d   RMS P                   pVe   VR8X  d)   S P                  V! W#4      G Rj  x€L
 V4      G Rj  x€L
 # S P                  p	Se
   VR8X  d   RpVR8X  d/   VP                  RS4      G Rj  x€L
 ;p
e   \	        \
        V
4      # VP                  RS4      pV! RR4      G Rj  x€L
 p\        V\        4      '       g   VP                  RSWËV4      G Rj  x€L
  M!VR8X  d   VP                  RS4      G Rj  x€L
  S P                  WÆ4      G Rj  x€L
 #  Lï Lä L¬ Lw LG L' L5i)aî  Read a resource from the server.

If the server returns an `InputRequiredResult`, the embedded input
requests are dispatched to this client's sampling / elicitation / roots
callbacks and the read is retried automatically (up to
`input_required_max_rounds`).

Args:
    uri: The URI of the resource to read.
    input_responses: Responses to seed the first call with (e.g. when
        resuming from a persisted `InputRequiredResult`).
    request_state: Opaque state to seed the first call with.
    meta: Additional metadata for the request.
    cache_mode: Cache behavior for this call (see `CacheMode`); seeded
        calls (`input_responses` or `request_state` set) ignore it.

Returns:
    The resource content.

Raises:
    InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
    MCPError: A callback returned `ErrorData` for an embedded input request.
    pydantic.ValidationError: The server returned a result that does not
        conform to the negotiated protocol version.
c               ó$   € V ^8„  d   QhRRRRRR/# )r[   Úrr›  ÚsrT  r]   z(ReadResourceResult | InputRequiredResultr_   )r`   s   "ra   rb   Ú*Client.read_resource.<locals>.__annotate__˜  s#   € ÷ 	ñ 	Ð0ð 	°Zð 	ÐDlñ 	rc   c              “  ó^   <"  € SP                   P                  SWSR R7      G Rj  x€L
 #  L5i©T)r—  r˜  rY  Úallow_input_requiredN)r;  Úread_resource)rž  rŸ  rY  r  rš  s   &&€€€ra   ÚretryÚ#Client.read_resource.<locals>.retry˜  s6   øé € ØŸ™×3Ñ3Ø Q¸dÐY]ð 4ó ÷ ð ñ ùs   ƒ#-¦+§-Nrt  ru  rv  zresources/read)r  Ú_drive_input_requiredr;  ry  r   r%   rz  r­   r   r{  Ú	evict_key)r  rš  r—  r˜  rY  rq  r¥  Úseededr¤   ró   r}  r  Úfirsts   ff$$d$       ra   r¤  ÚClient.read_resourceu  sG  úé € ÷F	ò 	ð !¨Ð,×IÐI°ÀTÐ0Iˆß‘ D×$8Ñ$8ˆØŠ=˜J¨(Ô2Ø×3Ñ3¹%ÀÓ:_×4_ÐafÓg×gÐgà�L‰LˆØÒ 
¨eÔ 3à"ˆJØ˜Ô°·±Ð<LÈcÓ1R×+RÐ$R CÒ#_äÔ*¨CÓ0Ð0Ø�m‰mÐ,¨cÓ2ˆÙ˜D $Ó'×'ˆÜ˜%Ô!4×5Ò5Ø—+‘+Ð.°°UÀÓL×LÑLØ˜9Ô$ð —/‘/Ð"2°CÓ8×8Ð8à×/Ñ/°Ó=×=Ð=ñ% 5`Ñgñ ,Sñ (áLñ 9á=ùs‚   …#E©/EÁEÁEÁ%E
Á&9EÂEÂ 6EÃEÃ1EÄEÄ	!EÄ*EÄ+EÅEÅEÅ
EÅEÅEÅEÅEÅEÚtools_list_changedÚprompts_list_changedÚresources_list_changedÚresource_subscriptionsc          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r[   r¬  rj   r­  r®  r¯  zSequence[str]r]   z)AbstractAsyncContextManager[Subscription]r_   )r`   s   "ra   rb   r  µ  s>   € ÷ 
ñ 
ð !ð
ð #ð	
ð
 !%ð
ð !.ð
ð 
3ñ
rc   c          	     óv   € \        V P                  TTTTV P                  e   V P                  R7      # RR7      # )a   Open a `subscriptions/listen` stream of typed change events (2026-07-28 only).

Keyword args mirror the wire `SubscriptionFilter`; entering waits for the ack (honored subset: `sub.honored`):

    async with client.listen(tools_list_changed=True) as sub:
        async for event in sub:
            tools = await client.list_tools()  # refetch on change

A graceful close ends the loop; an abrupt drop raises `SubscriptionLost`. No replay: re-listen and refetch.

Raises:
    ListenNotSupportedError: The negotiated protocol version predates 2026-07-28.
    MCPError: The server rejected the request or the connection failed first.
    SubscriptionLost: The stream ended before it was acknowledged.
    TimeoutError: The read timeout elapsed before the acknowledgment.
N)r¬  r­  r®  r¯  Úon_event)Ú_listenr;  r  Ú_evict_for_listen_event)r  r¬  r­  r®  r¯  s   &$$$$ra   rH   ÚClient.listenµ  sI   € ô0 Ø�L‰LØ1Ø!5Ø#9Ø#9Ø59×5IÑ5IÒ5U�T×1Ñ1ô
ð 	
ð \`ô
ð 	
rc   c               ó    € V ^8„  d   QhRRRR/# )r[   ÚeventrF   r]   rª   r_   )r`   s   "ra   rb   r  Ö  s   € ÷ ]ñ ]°;ð ]À4ñ ]rc   c              ƒ  óÌ   "  € V P                   pVf   Q h VP                  \        V/ 4      4      G Rj  x€L
  R#  L  \         d    \        P                  R4        R# i ; i5i)a0  Finish response-cache eviction before a listen consumer can refetch.

Without it the iterator wakes first and refetches a still-warm entry, with no
corrective wake (events are deduplicated level triggers). The tee path repeats
the eviction; deliberate: idempotent, and it covers non-iterating consumers.
Nz<Response cache eviction failed; the event is still delivered)r  r°   rS   r±   r²   r³   )r  r·  r¤   s   && ra   r´  ÚClient._evict_for_listen_eventÖ  s_   é € ð ×$Ñ$ˆØÒ Ð Ð ð	]Ø×.Ñ.Ô/DÀUÈBÓ/OÓP×PÔPøÜô 	]Ü×ÑÐ[×\ð	]üs1   ‚A$–= ´;µ= ¹A$»= ½ A!ÁA$Á A!Á!A$zMresources/subscribe is removed as of 2026-07-28; use Client.listen() instead.c               ó$   € V ^8„  d   QhRRRRRR/# ©r[   rš  r•   rY  r[  r]   r   r_   )r`   s   "ra   rb   r  è  s(   € ÷ Eñ E¨Cð EÐ:Rð EÐ^iñ Erc   c             ƒ  óV   "  € V P                   P                  WR7      G Rj  x€L
 #  L5i)z6Subscribe to resource updates (2025-era servers only).r]  N)r;  Úsubscribe_resource©r  rš  rY  s   &&$ra   r½  ÚClient.subscribe_resourceä  s%   é € ð —\‘\×4Ñ4°SÐ4ÓD×DÐDÑDùr`  zOresources/unsubscribe is removed as of 2026-07-28; use Client.listen() instead.c               ó$   € V ^8„  d   QhRRRRRR/# r»  r_   )r`   s   "ra   rb   r  ð  s(   € ÷ Gñ G¨cð GÐ<Tð GÐ`kñ Grc   c             ƒ  óV   "  € V P                   P                  WR7      G Rj  x€L
 #  L5i)z:Unsubscribe from resource updates (2025-era servers only).r]  N)r;  Úunsubscribe_resourcer¾  s   &&$ra   rÂ  ÚClient.unsubscribe_resourceì  s%   é € ð —\‘\×6Ñ6°sÐ6ÓF×FÐFÑFùr`  c               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# )r[   Únamer•   Ú	argumentszdict[str, Any] | Nonerõ   rô   Úprogress_callbackzProgressFnT | Noner—  r›  r˜  rT  rY  r[  r]   r   r_   )r`   s   "ra   rb   r  ô  sd   € ÷ _ñ _àð_ð )ð_ð +ð	_ð
 .ð_ð /ð_ð "ð_ð 'ð_ð 
ñ_rc   c          	   ƒ  óø  a aaaaaa"  € R VVVVVV 3R lloR VVV V3R llpS P                  V! WV4      G Rj  x€L
 V4      G Rj  x€L
 p	\        V	\        4      '       d   V	# S P                  P                  \        V	4      ,          p
V
P                  V	\        S P                  SSR7      4      G Rj  x€L
 pVP                  '       g%   S P                  P                  SV4      G Rj  x€L
  V#  L· L¬ L@ L5i)uá  Call a tool on the server.

If the server returns an `InputRequiredResult`, the embedded input
requests are dispatched to this client's sampling / elicitation / roots
callbacks and the call is retried automatically (up to
`input_required_max_rounds`). To drive the loop yourself â€” e.g. to
persist `request_state` across process restarts â€” use
`client.session.call_tool(..., allow_input_required=True)`. Persisted
state is still subject to the server's TTL, request binding, and key
lifetime; a server on the default process-local key rejects it after a restart.

Result shapes claimed by this client's `extensions` are finished by the
owning claim's resolver, whose `CallToolResult` is returned; resolver
exceptions propagate as-is. To receive the claimed shape yourself, use
`client.session.call_tool(..., allow_claimed=True)`.

On a 2026-07-28 connection, a call the server rejects with `HEADER_MISMATCH`
(this client has not listed the tool, or its input schema changed since) is
resent once after refetching the tool listing. A second rejection is raised,
and so is the first when the listing cannot be refetched.

Args:
    name: The name of the tool to call.
    arguments: Arguments to pass to the tool.
    read_timeout_seconds: Timeout for each underlying `tools/call` round, and
        for the whole re-list after a `HEADER_MISMATCH`. Defaults to this
        client's `read_timeout_seconds`.
    progress_callback: Callback for progress updates.
    input_responses: Responses to seed the first call with (e.g. when
        resuming from a persisted `InputRequiredResult`).
    request_state: Opaque state to seed the first call with.
    meta: Additional metadata for the request.

Returns:
    The tool result.

Raises:
    InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
    MCPError: A callback returned `ErrorData` for an embedded input request.
    pydantic.ValidationError: The server returned a result that does not
        conform to the negotiated protocol version.
c               ó$   € V ^8„  d   QhRRRRRR/# ©r[   rž  r›  rŸ  rT  r]   z-CallToolResult | InputRequiredResult | Resultr_   )r`   s   "ra   rb   Ú&Client.call_tool.<locals>.__annotate__*  s#   € ÷ 	ñ 	Ð/ð 	°Jð 	ÐCpñ 	rc   c              “  óh   <"  € SP                   P                  SSSSV VSR R R7	      G Rj  x€L
 #  L5i)T)rõ   rÇ  r—  r˜  rY  r£  Úallow_claimedN)r;  Ú	call_tool)rž  rŸ  rÆ  rY  rÅ  rÇ  rõ   r  s   &&€€€€€€ra   rr  ÚClient.call_tool.<locals>.send*  sG   øé € ØŸ™×/Ñ/ØØØ%9Ø"3Ø !ØØØ%)à"ð 0ó ÷ ð ñ ùs   ƒ(2«0¬2c               ó$   € V ^8„  d   QhRRRRRR/# rÊ  r_   )r`   s   "ra   rb   rË  8  s#   € ÷ 	(ñ 	(Ð0ð 	(°Zð 	(ÐDqñ 	(rc   c              “  óê  <"  €  S! W4      G R j  x€L
 #  L  \          dÏ   pTP                  \        8w  g   SP                  \        9  d   h Se   SMSP
                  p \        P                  ! T4      ;_uu_ 4        SP                  S4      G R j  x€L 
  R R R 4       M3  + '       g   i     M#; i  \         \        \        3 d   pY$hR p?ii ; iS! Y4      G R j  x€L 
 u R p?# R p?ii ; i5irm   )rP   rw  r   rº   r+   rõ   r   Ú
fail_afterÚ_relist_toolÚTimeoutErrorr,   )	rž  rŸ  ÚmismatchÚtimeoutÚrelist_errorrÅ  rõ   r  rr  s	   &&   €€€€ra   r¥  ÚClient.call_tool.<locals>.retry8  sÀ   øé € ð(Ù! !›Z×'Ð'Ñ'øÜô 
(Ø—=‘=¤OÔ3°t×7LÑ7LÔTlÔ7lØà2FÒ2RÑ.ÐX\×XqÑXq�ð5Ü×)Ò)¨'×2Õ2Ø"×/Ñ/°Ó5×5Ñ5÷ 3×2×2Ð2ûä ¤,´Ð@ô 5Ø"Ð4ûð5úá! !›Z×'Ð'Õ'ûð
(üsœ   ƒC3… �‘ ”C3• —C0¢=C+Á B5Á>B"ÂB
ÂB"ÂB5Â!C+Â"B2Â-B5Â1C+Â2B5Â5CÃCÃCÃC+Ã C#Ã!C+Ã%C0Ã&C3Ã+C0Ã0C3N)r;  Ú	tool_namerõ   )r§  r­   r   r  rÐ   rá   Úresolver7   r;  Úis_errorÚvalidate_tool_result)r  rÅ  rÆ  rõ   rÇ  r—  r˜  rY  r¥  r€  rì   Úfinalrr  s   fffff$$d    @ra   rÎ  ÚClient.call_toolô  sÌ   þé € ÷l	õ 	÷	(ó 	(ð ×1Ñ1¹¸oÓ8]×2]Ð_dÓe×eˆÜ�fœn×-Ò-ØˆMà×'Ñ'×0Ñ0´°f³Õ>ˆØ—m‘mØÜ §¡¸ÐThÔió
÷ 
ˆð �~�~ˆ~à—,‘,×3Ñ3°D¸%Ó@×@Ð@Øˆñ 3^Ñeñ

ñ AùsL   ‰1C:ºC2»C:ÁC4ÁA-C:Â5C6Â6C:ÃC:Ã+C8Ã,C:Ã4C:Ã6C:Ã8C:c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   rp  rT  rY  r[  rq  r4   r]   r   r_   )r`   s   "ra   rb   r  U  s4   € ÷ 
ñ 
ð ð
ð 'ð	
ð
 ð
ð 
ñ
rc   c          	   ƒ  ó\   a aa"  € S P                  RSSVVVV 3R lR7      G Rj  x€L
 #  L5i)z'List available prompts from the server.zprompts/listc                 óR   <€ SP                   P                  \        S SR 7      R7      # r†  )r;  Úlist_promptsr#   rŠ  s   €€€ra   r  Ú%Client.list_prompts.<locals>.<lambda>b  s!   ø€ ˜Ÿ™×2Ñ2Ô:PÐX^ÐfjÔ:kÐ2Ôlrc   rŒ  Nr�  rŽ  s   fdd$ra   râ  ÚClient.list_promptsU  s9   úé € ð ×'Ñ'ØØØØ!Þlð (ó 
÷ 
ð 	
ñ 
ùr�  c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r[   rÅ  r•   rÆ  údict[str, str] | Noner—  r›  r˜  rT  rY  r[  r]   r   r_   )r`   s   "ra   rb   r  e  sN   € ÷ 'dñ 'dàð'dð )ð'dð
 /ð'dð "ð'dð 'ð'dð 
ñ'drc   c             ƒ  ó‚   a aaa"  € R VVVV 3R llpS P                  V! W44      G Rj  x€L
 V4      G Rj  x€L
 #  L L5i)a…  Get a prompt from the server.

If the server returns an `InputRequiredResult`, the embedded input
requests are dispatched to this client's sampling / elicitation / roots
callbacks and the get is retried automatically (up to
`input_required_max_rounds`).

Args:
    name: The name of the prompt.
    arguments: Arguments to pass to the prompt.
    input_responses: Responses to seed the first call with (e.g. when
        resuming from a persisted `InputRequiredResult`).
    request_state: Opaque state to seed the first call with.
    meta: Additional metadata for the request.

Returns:
    The prompt content.

Raises:
    InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
    MCPError: A callback returned `ErrorData` for an embedded input request.
    pydantic.ValidationError: The server returned a result that does not
        conform to the negotiated protocol version.
c               ó$   € V ^8„  d   QhRRRRRR/# )r[   rž  r›  rŸ  rT  r]   z%GetPromptResult | InputRequiredResultr_   )r`   s   "ra   rb   Ú'Client.get_prompt.<locals>.__annotate__‡  s#   € ÷ 	ñ 	Ð0ð 	°Zð 	ÐDiñ 	rc   c           	   “  ó`   <"  € SP                   P                  SSWSR R7      G Rj  x€L
 #  L5ir¢  )r;  Ú
get_prompt)rž  rŸ  rÆ  rY  rÅ  r  s   &&€€€€ra   r¥  Ú Client.get_prompt.<locals>.retry‡  s8   øé € ØŸ™×0Ñ0Ø�i°È$Ðeið 1ó ÷ ð ñ ùs   ƒ$.§,¨.N)r§  )r  rÅ  rÆ  r—  r˜  rY  r¥  s   fff$$d ra   rë  ÚClient.get_prompte  s8   ûé € ÷D	ó 	ð
 ×/Ñ/±e¸OÓ6[×0[Ð]bÓc×cÐcÑ0[Ñcùs   †#?©;ª?¶=·?½?c               ó$   € V ^8„  d   QhRRRRRR/# )r[   rª  z_ResultT | InputRequiredResultr¥  zXCallable[[InputResponses | None, str | None], Awaitable[_ResultT | InputRequiredResult]]r]   rV   r_   )r`   s   "ra   rb   r  Ž  s)   € ÷ 
ñ 
à-ð
ð hð
ð 
ñ	
rc   c              ƒ  ó¨   a"  € \        V\        4      '       g   V# V P                  oR V3R llp\        WW P                  R7      G Rj  x€L
 #  L5i)u
  Hand an `InputRequiredResult` to the SEP-2322 driver, or pass a terminal result through.

`dispatch` routes each embedded request through the same callback table
that serves legacy serverâ†’client RPCs, so the two paths stay
behaviourally identical by construction.
c               ó$   € V ^8„  d   QhRRRRRR/# )r[   Úkeyr•   Úreqr   r]   zInputResponse | ErrorDatar_   )r`   s   "ra   rb   Ú2Client._drive_input_required.<locals>.__annotate__�  s'   € ÷ 	Bñ 	B ð 	B¨,ð 	BÐ;Tñ 	Brc   c              “  ó¬   <"  € \        SYP                  '       d   VP                  P                  MR R7      pSP                  W!4      G R j  x€L
 #  L5i)N)r;  Ú
request_idrY  )r;   rˆ  rY  Údispatch_input_request)rñ  rò  Úctxr;  s   && €ra   ÚdispatchÚ.Client._drive_input_required.<locals>.dispatch�  s?   øé € Ü&¨wÀ3×`j×`jÐ`jÈSÏZÉZÏ_Ê_ÐptÔuˆCØ ×7Ñ7¸ÓA×AÐAÑAùs   ƒA
AÁAÁA)rø  r¥  Ú
max_roundsN)r­   r   r;  r/   r  )r  rª  r¥  rø  r;  s   &&& @ra   r§  ÚClient._drive_input_requiredŽ  sT   øé € ô ˜%Ô!4×5Ò5ØˆLØ—,‘,ˆ÷	Bð 	Bô /Ø¨E×>\Ñ>\ô
÷ 
ð 	
ñ 
ùs   ƒAAÁAÁAc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   Úrefz+ResourceTemplateReference | PromptReferenceÚargumentzdict[str, str]Úcontext_argumentsræ  r]   r   r_   )r`   s   "ra   rb   r  ¥  s8   € ÷ lñ là8ðlð !ðlð 1ð	lð
 
ñlrc   c              ƒ  óX   "  € V P                   P                  WVR7      G Rj  x€L
 #  L5i)zúGet completions for a prompt or resource template argument.

Args:
    ref: Reference to the prompt or resource template
    argument: The argument to complete
    context_arguments: Additional context arguments

Returns:
    Completion suggestions.
)rý  rþ  rÿ  N)r;  r¼   )r  rý  rþ  rÿ  s   &&&&ra   r¼   ÚClient.complete¥  s(   é € ð  —\‘\×*Ñ*¨sÐYjÐ*Ók×kÐkÑkùs   ‚!*£(¤*c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r[   rp  rT  rY  r[  rq  r4   r]   r!   r_   )r`   s   "ra   rb   r  ·  s4   € ÷ 
ñ 
ð ð
ð 'ð	
ð
 ð
ð 
ñ
rc   c          	   ƒ  óf   a aa"  € S P                  RSSVVVV 3R lV 3R lR7      G Rj  x€L
 #  L5i)z%List available tools from the server.z
tools/listc                 óR   <€ SP                   P                  \        S SR 7      R7      # r†  )r;  Ú
list_toolsr#   rŠ  s   €€€ra   r  Ú#Client.list_tools.<locals>.<lambda>Ä  s!   ø€ ˜Ÿ™×0Ñ0Ô8NÐV\ÐdhÔ8iÐ0Ôjrc   c                óT   <€ SP                   P                  W P                  R J R7      # )N)r¼   )r;  Ú_absorb_tool_listingÚnext_cursor)r}  r  s   &€ra   r  r  È  s&   ø€ ˜tŸ|™|×@Ñ@ØŸo™o°Ð5ð  Aô  rc   )rp  rY  rq  rr  rn  Nr�  rŽ  s   fdd$ra   r  ÚClient.list_tools·  s>   úé € ð ×'Ñ'ØØØØ!Þjôð (ó 
÷ 
ð 	
ñ 
ùs   …%1ª/«1c               ó    € V ^8„  d   QhRRRR/# )r[   rÅ  r•   r]   rª   r_   )r`   s   "ra   rb   r  Í  s   € ÷ ñ  sð ¨tñ rc   c              ƒ  óH  a"  € Rp\        \        4       F…  pV P                  VRR7      G Rj  x€L
 pVP                  pVeW   \        ;QJ d)    V3R lVP
                   4       F  '       g   K   RM	  RM! V3R lVP
                   4       4      '       g   K„   R# 	  R#  Lq5i)zRRefetch the tool listing from the server, page by page, until a page lists `name`.Nrv  )rp  rq  c              3  ó@   <"  € T F  qP                   S8H  x € K  	  R # 5irm   )rÅ  )Ú.0ÚtoolrÅ  s   & €ra   Ú	<genexpr>Ú&Client._relist_tool.<locals>.<genexpr>Ó  s   øé € Ð$NÁ:¸4§Y¡Y°$Ö%6Ã:ùs   ƒTF)ÚrangerT   r  r	  ÚanyÚtools)r  rÅ  rp  ró   Úpages   &f   ra   rÓ  ÚClient._relist_toolÍ  sn   øé € à!ˆÜÔ'Ö(ˆAØŸ™°À9˜ÓM×MˆDØ×%Ñ%ˆFØŠ~§£Ô$NÀ4Ç:Â:Ó$N§§¢Ô$NÀ4Ç:Â:Ó$N×!NÔ!NÚó	 )ÙMùs!   ƒ+B"®B ¯B"ÁB"Á/%B"ÂB"z?The roots capability is deprecated as of 2026-07-28 (SEP-2577).c               ó   € V ^8„  d   QhRR/# r  r_   )r`   s   "ra   rb   r  ×  s   € ÷ 5ñ 5¨tñ 5rc   c              ƒ  óV   "  € V P                   P                  4       G Rj  x€L
  R#  L5i)z4Send a notification that the roots list has changed.N)r;  Úsend_roots_list_changedr  s   &ra   r  ÚClient.send_roots_list_changedÖ  s   é € ð �l‰l×2Ñ2Ó4×4Ô4ùs   ‚) '¡))r  r  r  r  r  r  )NNr_   )NNNrm   )>rÑ   rÒ   rÓ   rÔ   rÕ   rÖ   ry   rõ   rö   r÷   rø   rù   rú   rû   rý   rx   rÿ   r   r.   r  rÙ   r   r3   r¤   r  r  r  r  r  r  r-  r4  r<  rC  Úpropertyr;  rº   rM  rQ  rV  r-   rO   r^  rg  rl  r�  r‰  r”  r¤  rH   r´  r½  rÂ  rÎ  râ  rë  r§  r¼   r  rÓ  r  r×   r_   rc   ra   rò   rò   
  sM  ‡ ñð( NÓMðð ƒJð #Ð�dÓ"Ø6à)-Ð˜,Ó-Ø&à,0ÐÐ)Ó0Ø2à=AÐÐ:ÓAØnà/3ÐÐ,Ó3Ø4à*.ÐÐ'Ó.Ø6à%)€IÐ"Ó)ðKð 15€OÐ-Ó4Ø-à)-€KÐ&Ó-Ø7à€Dˆ+Óð,ð 37€NÐ/Ó6ð#ð 37ÐÐ/Ó6Ø5à%FÐ˜sÓFð+ð 48€JÐ0Ó7ðGñ !&°kÔ B€EÐÓBðñ  ¨uÔ5€HˆdÓ5Ù%*°¸tÔ%D€HÐ"ÓDÙ).°EÀ4Ô)H€KÐ&ÓHÙ  e°%ÀÔG€HˆjÓGÙ27¸UÈDÐW\ÐfkÔ2l€OÐ/ÓlÙ,1°uÀ5ÐRWÔ,XÐÐ)ÓXõ0õd
õ,õ2ð ô
ó ð
ð" ô9ó ð9ð ô(ó ð(ð ô<ó ð<ð ô)ó ð)ñ ØVØ&ôð7À$ö 7ó	ð7ñ ØfØ&ôö
ó	ð
ñ ÐSÐ^sÔtðLÐ_cö Ló uðLð%ð ?C÷%ðN
ð "ð
ð *.ð	
ð
 !&÷
ð 
ð "ð
ð *.ð	
ð
 !&÷
ð >>ð 26ð	>>ð
 %)ð>>ð *.ð>>ð !&÷>>ð@
ð $)ð
ð &+ð	
ð
 (-ð
ð 13÷
õB]ñ ØWØ&ôðEÐUYö Eó	ðEñ ØYØ&ôðGÐW[ö Gó	ðGñ_ð 26ð_ð %)ð_ð *.÷_ð _ðB
ð "ð
ð *.ð	
ð
 !&÷
ñ 'dð
 26ð'dð %)ð'dð *.÷'dð 'dõR
÷.lð$
ð "ð
ð *.ð	
ð
 !&÷
õ,ñ ÐQÐ\qÔrô5ó sô5rc   rò   r  )�Ú__conditional_annotations__rÕ   Ú
__future__r   r&  Úloggingr#  Úcollections.abcr   r   r   r   Ú
contextlibr   r   Údataclassesr	   r
   r   Útypingr   r   r   r   r   r   Úanyio.lowlevelÚ	mcp_typesr®   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   Úmcp_types.versionr*   r+   Úpydanticr,   Útyping_extensionsr-   Úmcp.client._input_requiredr.   r/   Úmcp.client._memoryr0   Úmcp.client._prober1   Úmcp.client._transportr2   Úmcp.client.cachingr3   r4   r5   r6   Úmcp.client.extensionr7   r8   r9   r:   Úmcp.client.sessionr;   r<   r=   r>   r?   r@   rA   rB   Úmcp.client.stdiorC   rD   Úmcp.client.streamable_httprE   Úmcp.client.subscriptionsrF   rG   rH   r³  Ú
mcp.serverrI   Úmcp.server.mcpserverrJ   Úmcp.server.runnerrK   Úmcp.shared.direct_dispatcherrL   Úmcp.shared.dispatcherrM   rN   Úmcp.shared.exceptionsrO   rP   Úmcp.shared.extensionrQ   Úmcp.shared.jsonrpc_dispatcherrR   Úmcp.shared.subscriptionsrS   Ú	getLoggerrÑ   r²   r•   rh   rT   rÖ   rU   rV   rW   rj   r^   rs   rŒ   r’   r¢   r¸   rÄ   r…   rÌ   rð   rò   )r  s   @ra   Ú<module>r<     sŽ  øðÜ Lå "ã Û Û ß BÓ Bß Bß 1Ñ 1ß 5Õ 5ã Û Û ÷÷ ÷ ÷ ÷ ÷ õ ÷6 TÝ $Ý (ç cÝ 0Ý ,Ý +ß fÓ fß `Ó `÷	÷ 	ó 	÷ AÝ =ß >Ý 6Ý Ý *Ý /Ý Fß 9ß AÝ >Ý ;Ý :à	×	Ò	˜8Ó	$€àÐ&Õ'¨#Õ-€ð_ð Ð �%Ó Ø xáˆTƒ]€Ù�:Ó€Ù�m¨?Ô;€à�~ {°DÐ9¸9ÐEVÕ;WÐWÕX€
ð5õõõ*	õBõ(õ$õñ �$Ô÷6ð 6ó ð6õ5pðp ÷N5ð N5ó òN5rc   