Skip to main content
New in version 2.10.0 User elicitation allows MCP servers to request structured input from users during tool execution. Instead of requiring all inputs upfront, tools can interactively ask for missing parameters, clarification, or additional context as needed. Elicitation enables tools to pause execution and request specific information from users:
  • Missing parameters: Ask for required information not provided initially
  • Clarification requests: Get user confirmation or choices for ambiguous scenarios
  • Progressive disclosure: Collect complex information step-by-step
  • Dynamic workflows: Adapt tool behavior based on user responses
For example, a file management tool might ask “Which directory should I create?” or a data analysis tool might request “What date range should I analyze?”

Overview

Use the ctx.elicit() method within any tool function to request user input. Specify the message to display and the type of response you expect.
The elicitation result contains an action field indicating how the user responded: FastMCP also provides typed result classes for pattern matching:

Multi-Turn Elicitation

Tools can make multiple elicitation calls to gather information progressively:

Client Requirements

Elicitation requires the client to implement an elicitation handler. If a client doesn’t support elicitation, calls to ctx.elicit() will raise an error indicating that elicitation is not supported. See Client Elicitation for details on how clients handle these requests.

Schema and Response Types

The server must send a schema to the client indicating the type of data it expects in response to the elicitation request. The MCP spec only supports a limited subset of JSON Schema types for elicitation responses—specifically JSON objects with primitive properties including string, number (or integer), boolean, and enum fields. FastMCP makes it easy to request a broader range of types, including scalars (e.g. str) or no response at all, by automatically wrapping them in MCP-compatible object schemas.

Scalar Types

You can request simple scalar data types for basic input, such as a string, integer, or boolean. When you request a scalar type, FastMCP automatically wraps it in an object schema for MCP spec compatibility. Clients will see a schema requesting a single “value” field of the requested type. Once clients respond, the provided object is “unwrapped” and the scalar value is returned directly in the data field.

No Response

Sometimes, the goal of an elicitation is to simply get a user to approve or reject an action. Pass None as the response type to indicate that no data is expected. The data field will be None when the user accepts.

Constrained Options

Constrain the user’s response to a specific set of values using a Literal type, Python enum, or a list of strings as a convenient shortcut.

Multi-Select

New in version 2.14.0 Enable multi-select by wrapping your choices in an additional list level. This allows users to select multiple values from the available options.

Titled Options

New in version 2.14.0 For better UI display, provide human-readable titles for enum options. FastMCP generates SEP-1330 compliant schemas using the oneOf pattern with const and title fields.
For multi-select with titles, wrap the dict in a list:

Structured Responses

Request structured data with multiple fields by using a dataclass, typed dict, or Pydantic model as the response type. Note that the MCP spec only supports shallow objects with scalar (string, number, boolean) or enum properties.

Default Values

New in version 2.14.0 Provide default values for elicitation fields using Pydantic’s Field(default=...). Clients will pre-populate form fields with these defaults. Fields with default values are automatically marked as optional.
Default values are supported for strings, integers, numbers, booleans, and enums.