You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sampling is done by manually sending a SamplingMessage directly, the user has to do things like manage checking that the client supports sampling.
Compared to eliciation which has its own method directly on Context
result = await ctx.elicit(
I'd imagine that having a similar ctx.sampling method would be a bit more consistent. Even if just as a thin wrapper over sending a sampling message with a clear error if sampling isn't supported. Happy to take that on.
A related issue, which I can separate into its own issue if you'd like: With FastMCP, if I have a tool that requires sampling, I want it to now show up in ListTools for clients like Claude Desktop that don't support it.
Thanks for the report. Closing this as it's been fixed in v2, which is now released (see #3049). If you still run into this on v2, feel free to reopen.
Activity
maxisbey commentedon Jul 29, 2026
Thanks for the report. Closing this as it's been fixed in v2, which is now released (see #3049). If you still run into this on v2, feel free to reopen.
AI Disclaimer