Skip to content

Support elicitation #8

Description

@thekid

See https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation.

Step 1

The LLM decides to perform a tool call
The MCP client sends this to the server:

POST /mcp HTTP/1.1
Content-Type: application/json
Mcp-Session-Id: session-abc123

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "send_email",
    "arguments": {
      "email": "user@example.com"
    }
  }
}

The server locates the tool and starts execution

Step 2

The tool needs additional information from the user
The MCP servers sends the following back to the MCP client:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "elicitation/create",
  "params": {
    "mode": "form",
    "message": "Please confirm sending an email",
    "requestedSchema": {
      "type": "object",
      "properties": {}
    }
  }
}

The MCP client leaves the the HTTP connection open

Step 3

The MCP client requests the required data from the user
The MCP client sends this to the server:

POST /mcp HTTP/1.1
Content-Type: application/json
Mcp-Session-Id: session-abc123

{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "action": "accept"
  }
}

The MCP server acknowledges this request

Step 4

The tool call is continued
The servers sends the result to the first response (the one which was left open above)

HTTP/1.1 200 OK
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "The registration was successful"
      }
    ],
  }
}

The tool call is now complete

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions