refactor: avoid double JSON parsing (#1917)

This commit is contained in:
Marcelo Trylesinski 2026-01-21 13:07:05 +01:00 • committed by GitHub
commit ae7793efd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,7 +114,7 @@ class FastMCP(Generic[LifespanResultT]):
website_url: str | None = None,
icons: list[Icon] | None = None,
version: str | None = None,
auth_server_provider: (OAuthAuthorizationServerProvider[Any, Any, Any] | None) = None,
auth_server_provider: OAuthAuthorizationServerProvider[Any, Any, Any] | None = None,
token_verifier: TokenVerifier | None = None,
*,
tools: list[Tool] | None = None,
@ -123,7 +123,7 @@ class FastMCP(Generic[LifespanResultT]):
warn_on_duplicate_resources: bool = True,
warn_on_duplicate_tools: bool = True,
warn_on_duplicate_prompts: bool = True,
lifespan: (Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None) = None,
lifespan: Callable[[FastMCP[LifespanResultT]], AbstractAsyncContextManager[LifespanResultT]] | None = None,
auth: AuthSettings | None = None,
):
self.settings = Settings(