René's URL Explorer Experiment


Title: MCPServer: content-block returns are unstructured, prompt messages take Image/Audio by maxisbey · Pull Request #3320 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: MCPServer: content-block returns are unstructured, prompt messages take Image/Audio by maxisbey · Pull Request #3320 · modelcontextprotocol/python-sdk

X Title: MCPServer: content-block returns are unstructured, prompt messages take Image/Audio by maxisbey · Pull Request #3320 · modelcontextprotocol/python-sdk

Description: The official Python SDK for Model Context Protocol servers and clients - MCPServer: content-block returns are unstructured, prompt messages take Image/Audio by maxisbey · Pull Request #3320 · modelcontextprotocol/python-sdk

Open Graph Description: Four small MCPServer/client fixes that remove traps the server docs would otherwise have to explain around. One commit per item so they can be reviewed (or dropped) independently. Behaviour change ...

X Description: Four small MCPServer/client fixes that remove traps the server docs would otherwise have to explain around. One commit per item so they can be reviewed (or dropped) independently. Behaviour change ...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/3320

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:4e077f82-e98b-e9c1-6991-bfd261d1e64b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD8EA:3D3A06:DE5E68:131DF54:6B05C369
html-safe-nonce70f4a37c3181b9f98f961998075db2c923236570954333b98457d7b93ec4fe92
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEVBOjNEM0EwNjpERTVFNjg6MTMxREY1NDo2QjA1QzM2OSIsInZpc2l0b3JfaWQiOiIyMzMxNDI5MTIzMzI4OTUxMTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdcf74eff7c218972cec643fc07b9c33a7ec3f2121d965f5498be3a563b7770d7
hovercard-subject-tagpull_request:4290724030
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits
twitter:imagehttps://opengraph.githubassets.com/1628f709691b2ef53004c73034340e1b9017429601381873b2e7c63b82ee6943/modelcontextprotocol/python-sdk/pull/3320
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1628f709691b2ef53004c73034340e1b9017429601381873b2e7c63b82ee6943/modelcontextprotocol/python-sdk/pull/3320
og:image:altFour small MCPServer/client fixes that remove traps the server docs would otherwise have to explain around. One commit per item so they can be reviewed (or dropped) independently. Behaviour change ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemaxisbey
hostnamegithub.com
expected-hostnamegithub.com
None13b1c5df76a26b2d8420784ae7f9fb9c438fc6cb0c95a689d26fb49879d8e556
turbo-cache-controlno-cache
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebcf1e3e7f14567fd89b0218ee06dd0aad8f1d288
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3320%2Fcommits
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3320%2Fcommits
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues320 (320)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
https://github.com/modelcontextprotocol/python-sdk
maxisbeyhttps://github.com/maxisbey
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
mcpserver-content-and-prompt-ergonomicshttps://github.com/modelcontextprotocol/python-sdk/tree/mcpserver-content-and-prompt-ergonomics
Conversationhttps://github.com/modelcontextprotocol/python-sdk/pull/3320
Commits11 (11)https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits
Checkshttps://github.com/modelcontextprotocol/python-sdk/pull/3320/checks
Files changedhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/files
MCPServer: content-block returns are unstructured, prompt messages take Image/Audiohttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits#top
maxisbeyhttps://github.com/maxisbey
mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
mcpserver-content-and-prompt-ergonomicshttps://github.com/modelcontextprotocol/python-sdk/tree/mcpserver-content-and-prompt-ergonomics
Remove stale TODO from Client.send_roots_list_changedhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/02a0c5e68fd56d3f0a15344fb505eba6223c390f
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
02a0c5ehttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/02a0c5e68fd56d3f0a15344fb505eba6223c390f
https://github.com/modelcontextprotocol/python-sdk/tree/02a0c5e68fd56d3f0a15344fb505eba6223c390f
Accept Image and Audio helpers as prompt message contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/523418995d04f74d215da6c9af0a9b3c38d82b4e
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
5234189https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/523418995d04f74d215da6c9af0a9b3c38d82b4e
https://github.com/modelcontextprotocol/python-sdk/tree/523418995d04f74d215da6c9af0a9b3c38d82b4e
Treat content-block, Image and Audio return annotations as unstructured tool outputhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/0be83f5e4f82fd60d66697274209804b72df1c47
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
0be83f5https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/0be83f5e4f82fd60d66697274209804b72df1c47
https://github.com/modelcontextprotocol/python-sdk/tree/0be83f5e4f82fd60d66697274209804b72df1c47
Let MCPServer.add_prompt take a function; export prompt Message classeshttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/d26de07100428444cec66fc1da648703c6ca35fc
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
d26de07https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/d26de07100428444cec66fc1da648703c6ca35fc
https://github.com/modelcontextprotocol/python-sdk/tree/d26de07100428444cec66fc1da648703c6ca35fc
Leave the migration guide alone; these are 2.x fixes, not v1->v2 breakshttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/988fbbf711de39f4ac3d8476c376a70194b60cec
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
988fbbfhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/988fbbf711de39f4ac3d8476c376a70194b60cec
https://github.com/modelcontextprotocol/python-sdk/tree/988fbbf711de39f4ac3d8476c376a70194b60cec
Drop the add_prompt(fn) overload; keep only the Message re-exportshttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/b1f7a298dbcf905addb18bd4ab2d0c69ba28f436
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
b1f7a29https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/b1f7a298dbcf905addb18bd4ab2d0c69ba28f436
https://github.com/modelcontextprotocol/python-sdk/tree/b1f7a298dbcf905addb18bd4ab2d0c69ba28f436
Review round: mirror _convert_to_content in the content rule; keep prompts and templates out of ithttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/9cc83c931640f7f32f6844679d9863ec29af5726
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
9cc83c9https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/9cc83c931640f7f32f6844679d9863ec29af5726
https://github.com/modelcontextprotocol/python-sdk/tree/9cc83c931640f7f32f6844679d9863ec29af5726
Prompt functions may return bare content blocks, Image or Audiohttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/2251112243f6521b662b9021d438e9514197609c
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
2251112https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/2251112243f6521b662b9021d438e9514197609c
https://github.com/modelcontextprotocol/python-sdk/tree/2251112243f6521b662b9021d438e9514197609c
Review nits: Annotated recursion looks at the type only; drop Iterable from content origins; prompt() docstringhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/6f95028f181c682fb26be72219de57302780cb09
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
6f95028https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/6f95028f181c682fb26be72219de57302780cb09
https://github.com/modelcontextprotocol/python-sdk/tree/6f95028f181c682fb26be72219de57302780cb09
Prompt render: let conversion errors surface; validate dict messages oncehttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/6015f97b3150fe9cbab544657a4f55de4f9358bd
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
6015f97https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/6015f97b3150fe9cbab544657a4f55de4f9358bd
https://github.com/modelcontextprotocol/python-sdk/tree/6015f97b3150fe9cbab544657a4f55de4f9358bd
Document that path-backed Image/Audio message content reads the file (Raises: OSError)https://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/4fadfddab167951ebd9b3762eda415ff53da67f9
https://github.com/maxisbey
maxisbeyhttps://github.com/modelcontextprotocol/python-sdk/commits?author=maxisbey
4fadfddhttps://github.com/modelcontextprotocol/python-sdk/pull/3320/commits/4fadfddab167951ebd9b3762eda415ff53da67f9
https://github.com/modelcontextprotocol/python-sdk/tree/4fadfddab167951ebd9b3762eda415ff53da67f9
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.