Skip to content

ctx.elicit() without response_type sends empty schema, causing clients to hang #3910

@pamelafox

Description

@pamelafox

Description

When calling ctx.elicit(message="...") without specifying response_type, FastMCP sends a requestedSchema with empty properties:

{"method":"elicitation/create","params":{"mode":"form","message":"Buy 1x Baguette for $5.00?","requestedSchema":{"type":"object","properties":{}}},"jsonrpc":"2.0","id":2}

The MCP spec requires requestedSchema to have meaningful properties for form mode elicitations (spec reference). Clients like VS Code render an empty form with no fields and a Submit button that does nothing, effectively hanging the tool call.

Reproduction

from fastmcp import FastMCP, Context

mcp = FastMCP("Test")

@mcp.tool
async def test_elicit(ctx: Context) -> str:
    response = await ctx.elicit(message="Confirm?")
    return f"action={response.action}"

Connect from VS Code with GitHub Copilot and trigger the tool. The elicitation dialog appears but is non-functional.

Expected behavior

Either:

  • Raise an error at call time if response_type is not specified (since form mode requires a schema with properties)
  • Default to response_type=None, which the FastMCP docs describe as valid for simple approve/reject dialogs

Environment

  • FastMCP 3.2.3
  • VS Code Insiders, April 2026

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions