Skip to content

Added Sampling Example to README #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RishiNandha
Copy link

@RishiNandha RishiNandha commented Jun 25, 2025

Motivation and Context

I had opened #697 earlier today when I was trying to find out how to send sampling requests to MCP Clients from an MCP Server made using our SDK. There is no explicit mention of "Sampling" in the README while the SDK supports this function.

How Has This Been Tested?

I have tested the example I've added into README to work. The received result in the attached example is of the below format when used with VS Code's Github Co-Pilot as the client:

{
    "model" : "github.copilot-chat/gpt-4.1",
    "role" : "assistant",
    "content": {
        "type" : "text",
        "text" : "text response"
    }
}

Breaking Changes

No Breakages

Types of changes

  • [ x ] Documentation update

Checklist

  • [ x ] I have read the MCP Documentation
  • [ x ] My code follows the repository's style guidelines
  • [ NA ] New and existing tests pass locally
  • [ NA ] I have added appropriate error handling
  • [ x ] I have added or updated documentation as needed
@RishiNandha RishiNandha changed the title Added Sampling Examples to README Added Sampling Example to README Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant