Assistant Message

An Assistant Message is the AI model's contribution to the conversation history. In the context of MCP, it often includes the "reasoning" or the decision to invoke a specific tool.

MCP Role

When an AI use an MCP tool, its response is captured as an assistant message that includes a tool_use (or similar) block.

{
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "I'll check the logs for you."
    },
    {
      "type": "tool_use",
      "id": "call_123",
      "name": "read_logs",
      "arguments": {"lines": 10}
    }
  ]
}

Relationship to Sampling

Servers can request the current conversation history (including previous assistant messages) via the sampling protocol to understand the state of the interaction.

Questions & Answers

What is an Assistant Message in an MCP-based interaction?

An Assistant Message is the AI model's contribution to the conversation history, which in MCP often contains the model's reasoning and its specific decisions to invoke one or more tools.

How does a tool call appear within an Assistant Message?

It typically appears as a structured tool_use block within the message content, specifying the tool's name, unique ID, and the arguments generated by the model for that call.

How can MCP servers access previous Assistant Messages?

Servers can use the sampling protocol to request the current conversation history from the client, allowing them to see previous assistant messages and understand the overall context of the interaction.

Back to Glossary