Title: Assumption of Sampling and session might be wrong? · Issue #119 · modelcontextprotocol/java-sdk · GitHub
Open Graph Title: Assumption of Sampling and session might be wrong? · Issue #119 · modelcontextprotocol/java-sdk
X Title: Assumption of Sampling and session might be wrong? · Issue #119 · modelcontextprotocol/java-sdk
Description: Hi all, @tzolov points here the following: Key point: according to the spec, you can only use listRoots or createMessages within an existing client session. This means these client features are only accessible from within tool/prompt/res...
Open Graph Description: Hi all, @tzolov points here the following: Key point: according to the spec, you can only use listRoots or createMessages within an existing client session. This means these client features are onl...
X Description: Hi all, @tzolov points here the following: Key point: according to the spec, you can only use listRoots or createMessages within an existing client session. This means these client features are onl...
Opengraph URL: https://github.com/modelcontextprotocol/java-sdk/issues/119
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assumption of Sampling and session might be wrong?","articleBody":"Hi all,\n\n@tzolov points [here ](https://github.com/modelcontextprotocol/java-sdk/issues/47#issuecomment-2756021969) the following:\n\n\u003e Key point: according to the spec, you can only use listRoots or createMessages within an existing client session. This means these client features are only accessible from within tool/prompt/resource handlers using the new exchange argument.\n\nI have read and re-read the spec but I'm unable to find any mention to that at all. \n\nEven the diagram doesn't seem to sustain that hypothesis:\n\n```mermaid\nsequenceDiagram\n participant Server\n participant Client\n participant User\n participant LLM\n\n Note over Server,Client: Server initiates sampling\n Server-\u003e\u003eClient: sampling/createMessage\n\n Note over Client,User: Human-in-the-loop review\n Client-\u003e\u003eUser: Present request for approval\n User--\u003e\u003eClient: Review and approve/modify\n\n Note over Client,LLM: Model interaction\n Client-\u003e\u003eLLM: Forward approved request\n LLM--\u003e\u003eClient: Return generation\n\n Note over Client,User: Response review\n Client-\u003e\u003eUser: Present response for approval\n User--\u003e\u003eClient: Review and approve/modify\n\n Note over Server,Client: Complete request\n Client--\u003e\u003eServer: Return approved response\n```\n\nWould it be possible to discuss the exact point of the spec that refers to this? I'm unable to find it.","author":{"url":"https://github.com/vromero","@type":"Person","name":"vromero"},"datePublished":"2025-04-07T21:48:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/119/java-sdk/issues/119"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5c2a8e5e-509b-92af-5ae4-0f144ff43314 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF54:159FE3:1037C52:17411B9:6A5A1135 |
| html-safe-nonce | 78193f3ff3f7e7917cf6a3f90b6d1ed83626a0d66c7da5aef9cff1a38d123c35 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjU0OjE1OUZFMzoxMDM3QzUyOjE3NDExQjk6NkE1QTExMzUiLCJ2aXNpdG9yX2lkIjoiMTk5NTIxMjQwMDQxNzcwNjI5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b1daea7b0dceba5e4bcb808ff4653f30fb3ede976565a76b90c37567fde44f5 |
| hovercard-subject-tag | issue:2978069251 |
| 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/_view_fragments/issues/show/modelcontextprotocol/java-sdk/119/issue_layout |
| twitter:image | https://opengraph.githubassets.com/67f51d6a5125da9410e044ad515b93a1070c2ceddd142469b2e4d7ef575a9c83/modelcontextprotocol/java-sdk/issues/119 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/67f51d6a5125da9410e044ad515b93a1070c2ceddd142469b2e4d7ef575a9c83/modelcontextprotocol/java-sdk/issues/119 |
| og:image:alt | Hi all, @tzolov points here the following: Key point: according to the spec, you can only use listRoots or createMessages within an existing client session. This means these client features are onl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vromero |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8c2fe7351e4e987cb8f75e2425a0b895d807779bc4c2d3c312be0a54082219f7 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/java-sdk git https://github.com/modelcontextprotocol/java-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 919609219 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/java-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 919609219 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/java-sdk |
| 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 | 501ec24a694e4933bb3d70e768b1461c0def57a2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width