From cb6499922ecbdfd6342a599b00096e891d098551 Mon Sep 17 00:00:00 2001 From: ShiWei Date: Wed, 4 Jun 2025 11:15:37 +0800 Subject: [PATCH] set body's description as well --- src/fastmcp/utilities/openapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fastmcp/utilities/openapi.py b/src/fastmcp/utilities/openapi.py index aa5e89bf0..862396966 100644 --- a/src/fastmcp/utilities/openapi.py +++ b/src/fastmcp/utilities/openapi.py @@ -942,7 +942,8 @@ def _combine_schemas(route: HTTPRoute) -> dict[str, Any]: # For now, just use the first content type's schema content_type = next(iter(route.request_body.content_schema)) body_schema = _replace_ref_with_defs( - route.request_body.content_schema[content_type].copy() + route.request_body.content_schema[content_type].copy(), + route.request_body.description, ) body_props = body_schema.get("properties", {})