MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / UserMessage

Class UserMessage

src/mcp/server/mcpserver/prompts/base.py:35–41  ·  view source on GitHub ↗

A message from the user.

Source from the content-addressed store, hash-verified

33
34
35class UserMessage(Message):
36 """A message from the user."""
37
38 role: Literal["user", "assistant"] = "user"
39
40 def __init__(self, content: str | ContentBlock, **kwargs: Any):
41 super().__init__(content=content, **kwargs)
42
43
44class AssistantMessage(Message):

Callers 15

fnMethod · 0.90
test_render_promptMethod · 0.90
test_basic_fnMethod · 0.90
test_async_fnMethod · 0.90
test_fn_with_argsMethod · 0.90
fnMethod · 0.90

Calls

no outgoing calls

Tested by 15

fnMethod · 0.72
test_render_promptMethod · 0.72
test_basic_fnMethod · 0.72
test_async_fnMethod · 0.72
test_fn_with_argsMethod · 0.72
fnMethod · 0.72