Skip to main content
v1 enum elicitation helpers (enumSchema, untitledEnum, titledEnum, legacyEnum, untitledMultiEnum, titledMultiEnum, and related types) are not exported from mcp-use v2. Use Zod schemas with ctx.elicit() instead.
In mcp-use v1, enum-style elicitation fields were built as raw JSON Schema fragments and composed with helpers exported from mcp-use/server. v2 uses stateless multi-round-trip elicitation: pass a Zod object schema to ctx.elicit, handle the required round when the client must collect input, then continue when the user accepts. See the Elicitation guide for form vs URL mode, client capability checks, and accept/decline/cancel handling. The elicitation example shows keyed form and URL flows on the native v2 API.

Migration map

Example

v1 code that composed enum fragments:
v2 equivalent with Zod and keyed elicitation:

Raw JSON Schema

If you still need a hand-written MCP schema, use the verbose ctx.elicit() overload with ElicitFormParams.requestedSchema. Prefer Zod for new code — mcp-use validates accepted responses and infers TypeScript types from the schema.

Next steps

Elicitation guide

When to use form vs URL mode and how to handle user decisions.

Tool context: elicit

Overloads, result types, timeouts, and validation errors.