René's URL Explorer Experiment


Title: OTel client span stays Unset when the tool result has isError: true · Issue #3810 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: OTel client span stays Unset when the tool result has isError: true · Issue #3810 · modelcontextprotocol/python-sdk

X Title: OTel client span stays Unset when the tool result has isError: true · Issue #3810 · modelcontextprotocol/python-sdk

Description: With mcp==2.3.0, the client span created in shared/jsonrpc_dispatcher.py sets ERROR status and error.type for a JSON-RPC error response (the #3174 fix), but not for a successful response whose CallToolResult.isError is true. The server s...

Open Graph Description: With mcp==2.3.0, the client span created in shared/jsonrpc_dispatcher.py sets ERROR status and error.type for a JSON-RPC error response (the #3174 fix), but not for a successful response whose Call...

X Description: With mcp==2.3.0, the client span created in shared/jsonrpc_dispatcher.py sets ERROR status and error.type for a JSON-RPC error response (the #3174 fix), but not for a successful response whose Call...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/3810

X: @github

direct link

Domain: redirect.github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OTel client span stays Unset when the tool result has isError: true","articleBody":"With `mcp==2.3.0`, the client span created in `shared/jsonrpc_dispatcher.py` sets ERROR status and `error.type` for a JSON-RPC error response (the #3174 fix), but not for a successful response whose `CallToolResult.isError` is true. The server span for the same call does set `error.type=tool_error` (`server/_otel.py`), so the two ends of one call disagree.\n\nThe OTel GenAI semantic conventions for MCP (`docs/gen-ai/mcp.md`, note on `error.type`) say instrumentation SHOULD set `error.type` to `tool_error` when the tool result reports an error.\n\n**Reproduction** (Python client and server, Streamable HTTP, default OTel setup):\n```\ngit clone https://github.com/mkwitko/mcp-reliability && cd mcp-reliability\nexamples/python-sdk-streamable-http/run.sh      # needs docker, uv, go\ngo run ./cmd/mcp-reliability doctor testdata/python-sdk-default.jsonl\n```\nOutput includes:\n```\n[WARN] MCP-ERR-003: client and server spans for \"tools/call fail\" disagree on failure: the client span lacks error.type\n```\nCaptured trace and write-up: https://github.com/mkwitko/mcp-reliability/blob/v0.1.0/docs/research/python-sdk-v2-validation.md\n\n**Suggested change:** after the response is parsed in the dispatcher, if the result is a `CallToolResult` with `isError`, set `error.type=\"tool_error\"` and status ERROR on the client span, matching `server/_otel.py`. Happy to send a PR if you agree with the direction.\n","author":{"url":"https://github.com/mkwitko","@type":"Person","name":"mkwitko"},"datePublished":"2026-11-03T12:06:21Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/3810"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9c3129df-f49f-d50b-9ea1-bb58b843e70f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC014:5662:22B00F3:2DA5CD0:6B055D27
html-safe-nonce104db731f2fa63f070111f6a4b43af9174eb06e1044b4c63f474f9ec5574357c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDE0OjU2NjI6MjJCMDBGMzoyREE1Q0QwOjZCMDU1RDI3IiwidmlzaXRvcl9pZCI6IjQ3MTkxOTIwMjgwNTQxMTc2NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb8d2d473324bb23bdb80618a69406b5631749177fc96f7c510113bfc490b5786
hovercard-subject-tagissue:6182230138
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/3810/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a2a026e391a1122f58c19a42d4e03f68b28dbe95dc80b704b3f3c0f1d2bb205c/modelcontextprotocol/python-sdk/issues/3810
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a2a026e391a1122f58c19a42d4e03f68b28dbe95dc80b704b3f3c0f1d2bb205c/modelcontextprotocol/python-sdk/issues/3810
og:image:altWith mcp==2.3.0, the client span created in shared/jsonrpc_dispatcher.py sets ERROR status and error.type for a JSON-RPC error response (the #3174 fix), but not for a successful response whose Call...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemkwitko
hostnamegithub.com
expected-hostnamegithub.com
None8a6760da3cce5e2d079d07e3b62df71194316c4478db1a5e38050f44fce72c72
turbo-cache-controlno-preview
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
release8327739ac0648b9c3c722b5f401f7338553936b8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/3810#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F3810
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://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F3810
Sign uphttps://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/3810
Reloadhttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/3810
Reloadhttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/3810
modelcontextprotocolhttps://redirect.github.com/modelcontextprotocol
python-sdkhttps://redirect.github.com/modelcontextprotocol/python-sdk
Codehttps://redirect.github.com/modelcontextprotocol/python-sdk
Issues320 (320)https://redirect.github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://redirect.github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://redirect.github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://redirect.github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://redirect.github.com/modelcontextprotocol/python-sdk/security
Insightshttps://redirect.github.com/modelcontextprotocol/python-sdk/insights
https://redirect.github.com/modelcontextprotocol/python-sdk
New issuehttps://redirect.github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3810
New issuehttps://redirect.github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3810
OTel client span stays Unset when the tool result has isError: truehttps://redirect.github.com/modelcontextprotocol/python-sdk/issues/3810#top
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/mkwitko
mkwitkohttps://github.com/mkwitko
on Nov 3, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3810#issue-6182230138
#3174https://github.com/modelcontextprotocol/python-sdk/issues/3174
https://github.com/mkwitko/mcp-reliability/blob/v0.1.0/docs/research/python-sdk-v2-validation.mdhttps://github.com/mkwitko/mcp-reliability/blob/v0.1.0/docs/research/python-sdk-v2-validation.md
claudehttps://redirect.github.com/apps/claude
bughttps://redirect.github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2https://redirect.github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
on Nov 3, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3810#event-35018263727
https://redirect.github.com/Aryan130103
Aryan130103https://redirect.github.com/Aryan130103
on Nov 3, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3810#issuecomment-6614002037
https://redirect.github.com/media-ctrl
media-ctrlhttps://redirect.github.com/media-ctrl
on Nov 5, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3810#issuecomment-6664174804
thinhnx128https://redirect.github.com/thinhnx128
on Nov 7, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3810#event-35430284162
fix(otel): mark client span ERROR with tool_error when tools/call ret…https://github.com/thinhnx128/python-sdk/commit/8fee2feb1215ee6ad83a55b7b5b8205015311856
8fee2fehttps://github.com/thinhnx128/python-sdk/commit/8fee2feb1215ee6ad83a55b7b5b8205015311856
https://redirect.github.com/rodrigogaraujo
rodrigogaraujohttps://redirect.github.com/rodrigogaraujo
on Nov 8, 2026https://github.com/modelcontextprotocol/python-sdk/issues/3810#issuecomment-6723844173
#3629https://github.com/modelcontextprotocol/python-sdk/pull/3629
Sign up for freehttps://redirect.github.com/signup?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3810
Sign in to commenthttps://redirect.github.com/login?return_to=https://github.com/modelcontextprotocol/python-sdk/issues/3810
bughttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
v2https://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
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-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.