Xj `ddlmZddlmZmZddlmZmZmZGdde Z Gdde Z y) ) annotations)Anycast)URL_ELICITATION_REQUIREDElicitRequestURLParams ErrorDatac0eZdZUdZded<dfd ZxZS)McpErrorzM Exception type raised when an error arrives over an MCP connection. rerrorcFt||j||_y)zInitialize McpError.N)super__init__messager )selfr __class__s i/mnt/ssd/data/Dropbox/adrian/vault-secondbrain/venv/lib/python3.12/site-packages/mcp/shared/exceptions.pyrzMcpError.__init__s ' )r r)__name__ __module__ __qualname____doc____annotations__r __classcell__rs@rr r s rr cReZdZdZ d dfd ZeddZeddZxZ S) UrlElicitationRequiredErrora< Specialized error for when a tool requires URL mode elicitation(s) before proceeding. Servers can raise this error from tool handlers to indicate that the client must complete one or more URL elicitations before the request can be processed. Example: raise UrlElicitationRequiredError([ ElicitRequestURLParams( mode="url", message="Authorization required for your files", url="https://example.com/oauth/authorize", elicitationId="auth-001" ) ]) c |dt|dkDrdndd}||_tt|d|Dcgc]}|j dd c}i }t ||ycc}w) z'Initialize UrlElicitationRequiredError.NzURL elicitationsz required elicitationsT)by_alias exclude_none)coderdata)len _elicitationsrr model_dumpr r)rr!rer rs rrz$UrlElicitationRequiredError.__init__'sv ?'ss ::1 134L3MVTYT^T^S_`a aDcNEJJ$4"5T#s(^ 4dhh~r6RSJZ[Q.==a@[ [<//\sC)N)r!list[ElicitRequestURLParams]rz str | None)returnr5)r rr6r) rrrrrpropertyr! classmethodr4rrs@rrrsL(# 2  $""00rrN) __future__rtypingrr mcp.typesrrr Exceptionr rrrr>s)"QQ y 20(20r