python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

feat: support embedded resources in sampling

Open LucaButBoring opened this issue 7 months ago • 0 comments

Updates sampling to support embedded resources in requests and responses.

Motivation and Context

Brings sampling to parity with tool calls in terms of supported message types. This PR is intended to support https://github.com/modelcontextprotocol/modelcontextprotocol/pull/522.

How Has This Been Tested?

Updated integration tests to include an embedded resource test.

Breaking Changes

None.

Types of changes

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

Checklist

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

Additional context

This PR will be updated accordingly if #725 is merged before this.

LucaButBoring avatar May 15 '25 21:05 LucaButBoring