From 7d7607473d7713d9937cbbbe0bfc635976c511d3 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:38:13 -0400 Subject: [PATCH] Stop pydantic 2.13 from leaking _WrappedResult docstring into tool output schemas (#3918) --- .github/workflows/run-upgrade-checks.yml | 2 +- src/fastmcp/tools/function_parsing.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/run-upgrade-checks.yml b/.github/workflows/run-upgrade-checks.yml index 180c25bc0..c94720ba7 100644 --- a/.github/workflows/run-upgrade-checks.yml +++ b/.github/workflows/run-upgrade-checks.yml @@ -121,7 +121,7 @@ jobs: - **ty (type checker)**: New ty releases frequently add stricter checks that flag previously-accepted code. Run `uv run ty check` locally with the latest ty to reproduce. Fix the type errors or bump the ty version floor in `pyproject.toml`. - **ruff**: New lint rules or stricter defaults in a ruff upgrade. - - **mcp SDK**: Breaking changes in the `mcp` package (new method signatures, renamed types). + - **MCP SDK**: Breaking changes in the `mcp` package (new method signatures, renamed types). ### What to do diff --git a/src/fastmcp/tools/function_parsing.py b/src/fastmcp/tools/function_parsing.py index 9b9b0870e..50d217ce6 100644 --- a/src/fastmcp/tools/function_parsing.py +++ b/src/fastmcp/tools/function_parsing.py @@ -67,8 +67,6 @@ logger = get_logger(__name__) @dataclass class _WrappedResult(Generic[T]): - """Generic wrapper for non-object return types.""" - result: T