Skip to content

Scalar/list elicitation schemas emit a non-suppressible top-level title (internal model name) #4477

Description

@whitford-olmst

Problem

With a scalar or list response_type, ctx.elicit() wraps the value in an object schema whose top-level title is FastMCP's internal wrapper name, "ScalarElicitationType", with no supported way to suppress it. (#3911 added control over the property-level title/description, but the object-level title remains.)

Example (fastmcp 3.4.2, mcp 1.28.0)

from fastmcp.server.elicitation import parse_elicit_response_type
parse_elicit_response_type(["yes", "no"]).schema
# {
#   "type": "object",
#   "properties": {"value": {"enum": ["yes","no"], "title": "Value", "type": "string"}},
#   "required": ["value"],
#   "title": "ScalarElicitationType",   # internal model name, on the wire
# }

Expected vs. actual

  • Expected: the wrapper schema doesn't put FastMCP's internal model name on the wire (or lets it be suppressed).
  • Actual: every scalar/list elicitation emits "title": "ScalarElicitationType".

Non-obvious insight (from research)

This breaks clients that parse requestedSchema strictly: Codex (CLI + Desktop) declares its schema with serde deny_unknown_fields and rejects every FastMCP elicitation with unknown field 'title', so the form never renders (openai/codex#31163). I confirmed empirically that an otherwise-identical title-less schema renders and is accepted on the same client. The MCP requestedSchema (2025-11-25) sets no additionalProperties: false and title is valid JSON Schema, so this is arguably also a client bug — but since the emitted title is a valueless internal name, dropping it fixes the interop failure with no downside.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.serverRelated to FastMCP server implementation or server-side functionality.

    Type

    No type

    Fields

    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