feat: Allow ResourceContents objects to be returned directly from read_resource handlers#1476
Closed
alexanderreiff wants to merge 10 commits intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom
alexanderreiff:return-resource-directlyalexanderreiff/mcp-python-sdk:return-resource-directlyCopy head branch name to clipboard
Closed
feat: Allow ResourceContents objects to be returned directly from read_resource handlers#1476alexanderreiff wants to merge 10 commits intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom alexanderreiff:return-resource-directlyalexanderreiff/mcp-python-sdk:return-resource-directlyCopy head branch name to clipboard
alexanderreiff wants to merge 10 commits intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom
alexanderreiff:return-resource-directlyalexanderreiff/mcp-python-sdk:return-resource-directlyCopy head branch name to clipboard
Commits
Commits on Jan 5, 2026
feat: Allow ResourceContents objects to be returned directly from read_resource handlers
Show description for 776aaf4andcommittedfeat: Allow FastMCP resources to return ResourceContents objects directly
Show description for ddeebbbandcommittedtest: Add comprehensive tests for ResourceContents direct return functionality
Show description for 503cb12andcommitteddocs: Add examples showing ResourceContents direct return with metadata
Show description for 4e2a7efandcommittedrefactor: Clean up imports in FastMCP resource modules
Show description for b0803caandcommittedfix: Use _meta field instead of meta in ResourceContents examples
Show description for f981b65andcommittedfix: Resolve lint issues and formatting
Show description for 91eb77candcommittedfix: Resolve pyright type errors in ResourceContents tests
Show description for 4d2a939andcommittedfix: Replace datetime.UTC with timezone.utc for Python compatibility
Show description for 36216e0andcommittedfix: Add pragma no cover to unreachable test branches
Show description for 18f3003committed