Skip to content

We need some more client and sampling examples and use-cases. #539

Open
@z29

Description

@z29

The client examples provided are vague and the sampling examples, non-existant. The best I could find was:

  async def handle_sampling_message(
      message: types.CreateMessageRequestParams,
  ) -> types.CreateMessageResult:
      return types.CreateMessageResult(
          role="assistant",
          content=types.TextContent(
              type="text",
              text="Hello, world! from model",
          ),
          model="gpt-3.5-turbo",
          stopReason="endTurn",
      )

this barely explains how it works, and worse, doesn't show how to invoke sampling on the server-side. The documentation on the mcp website is even more vague.

Then there seem to be multiple ways to create a client:

I'm just trying to learn, but its confusing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions