Skip to content

docs: explain client-side sampling callbacks#2789

Open
He-wei-gui wants to merge 1 commit into
modelcontextprotocol:mainfrom
He-wei-gui:docs/sampling-client-callbacks
Open

docs: explain client-side sampling callbacks#2789
He-wei-gui wants to merge 1 commit into
modelcontextprotocol:mainfrom
He-wei-gui:docs/sampling-client-callbacks

Conversation

@He-wei-gui
Copy link
Copy Markdown

Summary

  • add a Sampling docs page for the server-to-client sampling flow
  • explain that clients opt in with sampling_callback and own the model/provider call
  • document how model_preferences, include_context, and ClientRequestContext reach the callback
  • add the page to the MkDocs navigation

This intentionally keeps the change provider-neutral and docs-only. It complements the existing server-side sampling snippet and avoids adding a full example project or model-provider dependency.

Addresses #1205.

Testing

  • PYTHONIOENCODING=utf-8 uv run mkdocs build --strict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant