From f790c31c82c87fdd7e3a515a4083ee4a5a9f77bb Mon Sep 17 00:00:00 2001 From: Sai Mouli Date: Fri, 7 Aug 2026 00:08:42 +0530 Subject: [PATCH] Clarify why unresolved hints fall back to the raw annotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01BAKNJthovhc5VSi4MTiZUe --- fastmcp_slim/fastmcp/resources/template.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastmcp_slim/fastmcp/resources/template.py b/fastmcp_slim/fastmcp/resources/template.py index 14332ba74..fb1d7832b 100644 --- a/fastmcp_slim/fastmcp/resources/template.py +++ b/fastmcp_slim/fastmcp/resources/template.py @@ -580,8 +580,9 @@ class FunctionResourceTemplate(ResourceTemplate): try: hints = _resolve_param_hints(fn) except NameError: - # An annotation naming something we can't import here is not - # worth failing registration over; fall back to the raw form. + # Pydantic resolves annotations against namespaces this doesn't + # see, so a name we can't resolve may still be valid. Fall back + # to the raw form rather than failing a working registration. hints = {} exploded = {