René's URL Explorer Experiment


Title: feat: return raw MCP results from workspace MCP tools by ethanndickson · Pull Request #31385 · coder/coder · GitHub

Open Graph Title: feat: return raw MCP results from workspace MCP tools by ethanndickson · Pull Request #31385 · coder/coder

X Title: feat: return raw MCP results from workspace MCP tools by ethanndickson · Pull Request #31385 · coder/coder

Description: Part of CODAGT-1430. Stacked on #31384. Workspace MCP tool results go through the agent's convertResult, which turns an embedded resource into a [embedded resource: ...] string and drops structured content, so a PDF from a workspace MCP server never reaches the model. Remote MCP tools already go through mcpclient's converter, which keeps both. When a call-tool request sets include_result, the agent now returns the MCP CallToolResult as-is in Result and leaves Content empty. chattool always sets it and converts the result with mcpclient.ConvertCallResult, so workspace and remote MCP tools share one converter. Older agents ignore the flag and send the legacy Content, which we adapt to MCP content and pass to the same converter. The workspace MCP docs get a short Tool results section too.

Open Graph Description: Part of CODAGT-1430. Stacked on #31384. Workspace MCP tool results go through the agent's convertResult, which turns an embedded resource into a [embedded resource: ...] string and drops struct...

X Description: Part of CODAGT-1430. Stacked on #31384. Workspace MCP tool results go through the agent's convertResult, which turns an embedded resource into a [embedded resource: ...] string and drops st...

Opengraph URL: https://github.com/coder/coder/pull/31385

X: @github

direct link

Domain: github.com

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/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:17e89274-1090-d6c6-094a-5f5f42c76640
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA1B0:16AB79:1CF1E95:24C89B3:6B015C3C
html-safe-nonce3645b2c2024a3ffb0a0a99b1817c5e748f40d221baec6553514b02b94095c26e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUIwOjE2QUI3OToxQ0YxRTk1OjI0Qzg5QjM6NkIwMTVDM0MiLCJ2aXNpdG9yX2lkIjoiNDY1MTIwMjAzNzYwNTU3MTE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac703c2a4ee22d9f95c35609c43c3d41b297d812d73cdb538bb10182c49cc7e21d
hovercard-subject-tagpull_request:5043837467
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/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/coder/pull/31385/files
twitter:imagehttps://avatars.githubusercontent.com/u/39577870?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/39577870?s=400&v=4
og:image:altPart of CODAGT-1430. Stacked on #31384. Workspace MCP tool results go through the agent's convertResult, which turns an embedded resource into a [embedded resource: ...] string and drops struct...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/coder/pull/31385/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F31385%2Ffiles
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%2Fcoder%2Fcoder%2Fpull%2F31385%2Ffiles
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%2Ffiles&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/pull/31385/files
Reloadhttps://github.com/coder/coder/pull/31385/files
Reloadhttps://github.com/coder/coder/pull/31385/files
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
ethanndicksonhttps://github.com/ethanndickson
codagt-1430-media-rulehttps://github.com/coder/coder/tree/codagt-1430-media-rule
codagt-1430-workspace-mcp-resultshttps://github.com/coder/coder/tree/codagt-1430-workspace-mcp-results
Conversation 20 https://github.com/coder/coder/pull/31385
Commits 6 https://github.com/coder/coder/pull/31385/commits
Checks 40 https://github.com/coder/coder/pull/31385/checks
Files changed https://github.com/coder/coder/pull/31385/files
Please reload this pagehttps://github.com/coder/coder/pull/31385/files
feat: return raw MCP results from workspace MCP tools https://github.com/coder/coder/pull/31385/files#top
Show all changes 6 commits https://github.com/coder/coder/pull/31385/files
63f2a16 refactor(coderd/x/chatd/mcpclient): export ConvertCallResult ethanndickson Oct 23, 2026 https://github.com/coder/coder/pull/31385/commits/63f2a1619cca81d8d10952dbbc2b7a5347088844
f30c17a feat: return raw MCP results from the agent call-tool API ethanndickson Oct 23, 2026 https://github.com/coder/coder/pull/31385/commits/f30c17a29f49ff139582f160afee4fdd9b04794b
dabca0d fix(coderd/x/chatd/chattool): convert workspace MCP results with mcpc… ethanndickson Oct 23, 2026 https://github.com/coder/coder/pull/31385/commits/dabca0d87c1bcc08823a06f94b53b23be2c1fd92
57bc948 refactor(agent/x/agentmcp): encode raw MCP results in their own function ethanndickson Oct 23, 2026 https://github.com/coder/coder/pull/31385/commits/57bc948688aed9a56beedfa80d68e1d59427441d
2eef4d2 docs(docs/ai-coder/agents): describe images and PDFs in workspace MCP… ethanndickson Oct 28, 2026 https://github.com/coder/coder/pull/31385/commits/2eef4d224e5b7193c112ae6f921e7370a05e3302
d2aad7c docs(docs/coder-agents): link workspace MCP tool results to the share… ethanndickson Nov 9, 2026 https://github.com/coder/coder/pull/31385/commits/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b
Clear filters https://github.com/coder/coder/pull/31385/files
Please reload this pagehttps://github.com/coder/coder/pull/31385/files
Please reload this pagehttps://github.com/coder/coder/pull/31385/files
manager.go https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
manager_internal_test.go https://github.com/coder/coder/pull/31385/files#diff-0cf112b4ca7ee320feebba04f0f46ce57f74ed0ef19de7908eb905a2f98460a4
mcpworkspace.go https://github.com/coder/coder/pull/31385/files#diff-00113f49ff60d03a52d3be45399fb3535ff23009c1617d446a429d3fec4ce3ac
mcpworkspace_test.go https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
export_test.go https://github.com/coder/coder/pull/31385/files#diff-2f21cdef9152832da0227caa08944d3140e9d5b1b69c3eb3e5c65c9ca6b680fe
mcpclient.go https://github.com/coder/coder/pull/31385/files#diff-e7a10ba57112a5b96d8ebb907c0c550a6548e45de1e016296dd9772726dbd9d5
mcpclient_test.go https://github.com/coder/coder/pull/31385/files#diff-2063c385d77e2bd64c7dd0fdc6f3d3b3b5ed2d7799efcda22c2cacc24676c1a9
agentconn.go https://github.com/coder/coder/pull/31385/files#diff-4a9389f5b9f3a4e44d42e098bc76363901ad6b68a8768e7f4ff35870c6a61b03
extending-agents.md https://github.com/coder/coder/pull/31385/files#diff-6f15f9778b8417743db76f0d8ec903e6f0bafc72a3a1da9e0e1d69e8b570a659
agent/x/agentmcp/manager.gohttps://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/agent/x/agentmcp/manager.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
https://github.com/coder/coder/pull/31385/files#diff-c1331d410fd968fa3486746881660ffa3eb5e227fc9397a08ac391f269b1ae5a
agent/x/agentmcp/manager_internal_test.gohttps://github.com/coder/coder/pull/31385/files#diff-0cf112b4ca7ee320feebba04f0f46ce57f74ed0ef19de7908eb905a2f98460a4
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/agent/x/agentmcp/manager_internal_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-0cf112b4ca7ee320feebba04f0f46ce57f74ed0ef19de7908eb905a2f98460a4
https://github.com/coder/coder/pull/31385/files#diff-0cf112b4ca7ee320feebba04f0f46ce57f74ed0ef19de7908eb905a2f98460a4
coderd/x/chatd/chattool/mcpworkspace.gohttps://github.com/coder/coder/pull/31385/files#diff-00113f49ff60d03a52d3be45399fb3535ff23009c1617d446a429d3fec4ce3ac
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/coderd/x/chatd/chattool/mcpworkspace.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-00113f49ff60d03a52d3be45399fb3535ff23009c1617d446a429d3fec4ce3ac
https://github.com/coder/coder/pull/31385/files#diff-00113f49ff60d03a52d3be45399fb3535ff23009c1617d446a429d3fec4ce3ac
https://github.com/coder/coder/pull/31385/files#diff-00113f49ff60d03a52d3be45399fb3535ff23009c1617d446a429d3fec4ce3ac
https://github.com/coder/coder/pull/31385/files#diff-00113f49ff60d03a52d3be45399fb3535ff23009c1617d446a429d3fec4ce3ac
coderd/x/chatd/chattool/mcpworkspace_test.gohttps://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/coderd/x/chatd/chattool/mcpworkspace_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
https://github.com/coder/coder/pull/31385/files#diff-c7d3dd33e47a7991289e8db4c9c291879cee2efcbdc0b350bab47b44930ba93a
coderd/x/chatd/mcpclient/export_test.gohttps://github.com/coder/coder/pull/31385/files#diff-2f21cdef9152832da0227caa08944d3140e9d5b1b69c3eb3e5c65c9ca6b680fe
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/coderd/x/chatd/mcpclient/export_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-2f21cdef9152832da0227caa08944d3140e9d5b1b69c3eb3e5c65c9ca6b680fe
https://github.com/coder/coder/pull/31385/files#diff-2f21cdef9152832da0227caa08944d3140e9d5b1b69c3eb3e5c65c9ca6b680fe
coderd/x/chatd/mcpclient/mcpclient.gohttps://github.com/coder/coder/pull/31385/files#diff-e7a10ba57112a5b96d8ebb907c0c550a6548e45de1e016296dd9772726dbd9d5
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/coderd/x/chatd/mcpclient/mcpclient.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-e7a10ba57112a5b96d8ebb907c0c550a6548e45de1e016296dd9772726dbd9d5
https://github.com/coder/coder/pull/31385/files#diff-e7a10ba57112a5b96d8ebb907c0c550a6548e45de1e016296dd9772726dbd9d5
https://github.com/coder/coder/pull/31385/files#diff-e7a10ba57112a5b96d8ebb907c0c550a6548e45de1e016296dd9772726dbd9d5
https://github.com/coder/coder/pull/31385/files#diff-e7a10ba57112a5b96d8ebb907c0c550a6548e45de1e016296dd9772726dbd9d5
coderd/x/chatd/mcpclient/mcpclient_test.gohttps://github.com/coder/coder/pull/31385/files#diff-2063c385d77e2bd64c7dd0fdc6f3d3b3b5ed2d7799efcda22c2cacc24676c1a9
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/coderd/x/chatd/mcpclient/mcpclient_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-2063c385d77e2bd64c7dd0fdc6f3d3b3b5ed2d7799efcda22c2cacc24676c1a9
https://github.com/coder/coder/pull/31385/files#diff-2063c385d77e2bd64c7dd0fdc6f3d3b3b5ed2d7799efcda22c2cacc24676c1a9
https://github.com/coder/coder/pull/31385/files#diff-2063c385d77e2bd64c7dd0fdc6f3d3b3b5ed2d7799efcda22c2cacc24676c1a9
https://github.com/coder/coder/pull/31385/files#diff-2063c385d77e2bd64c7dd0fdc6f3d3b3b5ed2d7799efcda22c2cacc24676c1a9
codersdk/workspacesdk/agentconn.gohttps://github.com/coder/coder/pull/31385/files#diff-4a9389f5b9f3a4e44d42e098bc76363901ad6b68a8768e7f4ff35870c6a61b03
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/codersdk/workspacesdk/agentconn.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-4a9389f5b9f3a4e44d42e098bc76363901ad6b68a8768e7f4ff35870c6a61b03
https://github.com/coder/coder/pull/31385/files#diff-4a9389f5b9f3a4e44d42e098bc76363901ad6b68a8768e7f4ff35870c6a61b03
docs/coder-agents/extending-agents.mdhttps://github.com/coder/coder/pull/31385/files#diff-6f15f9778b8417743db76f0d8ec903e6f0bafc72a3a1da9e0e1d69e8b570a659
View file https://github.com/coder/coder/blob/d2aad7c1c9f195a45efaae1a4fe5e9ca24bf344b/docs/coder-agents/extending-agents.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31385/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31385/files#diff-6f15f9778b8417743db76f0d8ec903e6f0bafc72a3a1da9e0e1d69e8b570a659
https://github.com/coder/coder/pull/31385/files#diff-6f15f9778b8417743db76f0d8ec903e6f0bafc72a3a1da9e0e1d69e8b570a659
Please reload this pagehttps://github.com/coder/coder/pull/31385/files
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

Viewport: width=device-width


URLs of crawlers that visited me.