Title: Issue · GitHub
Open Graph Title: Issue · modelcontextprotocol/modelcontextprotocol
X Title: Issue · modelcontextprotocol/modelcontextprotocol
Description: Specification and documentation for the Model Context Protocol - Issue · modelcontextprotocol/modelcontextprotocol
Open Graph Description: Specification and documentation for the Model Context Protocol - Issue · modelcontextprotocol/modelcontextprotocol
X Description: Specification and documentation for the Model Context Protocol - Issue · modelcontextprotocol/modelcontextprotocol
Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bring back the concept of \"toolResult\" (non-chat result)","articleBody":"**Is your feature request related to a problem? Please describe.**\r\n\r\nI was working on an MCP client using the typescript SDK and saw `toolResult` as something I could get back from `callTool()`, but after opening [this issue](https://github.com/modelcontextprotocol/servers/issues/151) I was informed that `toolResult` is no longer a thing in the spec.\r\n\r\n**Describe the solution you'd like**\r\n\r\nI would like a non-chat-content way for tools to return the tool result, [this discussion](https://github.com/modelcontextprotocol/specification/discussions/90) is sort of touching on the same problem, maybe the LLM doesn't necessarily need the full tool result in the chat - maybe the client can choose to use it differently?\r\n\r\nI realize that simply an arbitrary \"result\" field is not a great solution in a spec and maybe that's why it was dropped, but having only one thing to return to the caller - the \"chat history\" - is very limiting. if `toolResult: any` is the temporary solution - I still think it has uses (if only for inspector-like tools).\r\n\r\n```ts\r\nreturn {\r\n toolResult: results, // raw result object\r\n content: [\r\n {\r\n type: 'text',\r\n text: formattedResults, // formatted as chat-message\r\n },\r\n ],\r\n isError: false,\r\n};\r\n```\r\n\r\nThanks","author":{"url":"https://github.com/Madd0g","@type":"Person","name":"Madd0g"},"datePublished":"2024-12-04T14:50:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":36},"url":"https://github.com/97/modelcontextprotocol/issues/97"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:8033db87-4ebd-153b-1d88-bbe62c7fba18 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9000:3A479:1BBF169:2527887:6A598592 |
| html-safe-nonce | ac2b0bbf42fca250d3d0793152d73b1fe09c589ec6d3c6c368547cd398dbf86f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDAwOjNBNDc5OjFCQkYxNjk6MjUyNzg4Nzo2QTU5ODU5MiIsInZpc2l0b3JfaWQiOiI2NjUwNTQ1MDQ5MDMzMDgyMjU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a918aea86fe9da53d65c7d41a813886fa117a7abc0e061a9e70a39bc61121ac8 |
| hovercard-subject-tag | repository:862570523 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/modelcontextprotocol/issues/97 |
| twitter:image | https://opengraph.githubassets.com/028b7132516545a57c92ca27bbcb7c9e224782b0ac8a7f0e6f79207198a7a5a4/modelcontextprotocol/modelcontextprotocol |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/028b7132516545a57c92ca27bbcb7c9e224782b0ac8a7f0e6f79207198a7a5a4/modelcontextprotocol/modelcontextprotocol |
| og:image:alt | Specification and documentation for the Model Context Protocol - Issue · modelcontextprotocol/modelcontextprotocol |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-cache |
| go-import | github.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862570523 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/modelcontextprotocol |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862570523 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/modelcontextprotocol |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624bb50a7497aa346bef8cc3743af408a9ea10ca |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width