Skip to content

[Doc] Restructure sampling section to lead with tool usage#295

Open
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
koic:update_sampling_example
Open

[Doc] Restructure sampling section to lead with tool usage#295
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
koic:update_sampling_example

Conversation

@koic
Copy link
Copy Markdown
Member

@koic koic commented Apr 4, 2026

Motivation and Context

Sampling is primarily used within tool execution via server_context.create_sampling_message, but the documentation led with the less common direct Server#create_sampling_message usage. This ordering could mislead readers into thinking direct usage is the recommended approach.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Sampling is primarily used within tool execution via `server_context.create_sampling_message`,
but the documentation led with the less common direct `Server#create_sampling_message` usage.
This ordering could mislead readers into thinking direct usage is the recommended approach.
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