Skip to content

McpElicitationFormParams

Base classes

Name Children Inherits
_McpElicitationBase
codexed.models.request_params
Common fields for MCP elicitation requests.

⋔ Inheritance diagram

graph TD
  3476386904["request_params.McpElicitationFormParams"]
  2277154648["request_params._McpElicitationBase"]
  3116041069["base.CodexBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2277154648 --> 3476386904
  3116041069 --> 2277154648
  3879467795 --> 3116041069
  2751680898 --> 3879467795

🛈 DocStrings

Bases: _McpElicitationBase

Form-mode MCP elicitation request.

Source code in src/codexed/models/request_params.py
class McpElicitationFormParams(_McpElicitationBase):
    """Form-mode MCP elicitation request."""

    mode: Literal["form"] = "form"
    requested_schema: dict[str, Any]

    def to_mcp(self) -> ElicitRequestFormParams:
        from mcp.types import ElicitRequestFormParams

        return ElicitRequestFormParams(
            message=self.message,
            requested_schema=self.requested_schema,
            meta=_to_mcp_meta(self.meta),
        )

    @classmethod
    def from_mcp(
        cls,
        params: ElicitRequestFormParams,
        thread_id: str,
        server_name: str,
        turn_id: str | None = None,
    ) -> McpElicitationFormParams:
        """Create from MCP ElicitRequestFormParams."""
        return cls(
            message=params.message,
            requested_schema=dict(params.requested_schema),
            meta=_from_mcp_meta(params.meta),
            thread_id=thread_id,
            server_name=server_name,
            turn_id=turn_id,
        )

from_mcp classmethod

from_mcp(
    params: ElicitRequestFormParams, thread_id: str, server_name: str, turn_id: str | None = None
) -> McpElicitationFormParams

Create from MCP ElicitRequestFormParams.

Source code in src/codexed/models/request_params.py
@classmethod
def from_mcp(
    cls,
    params: ElicitRequestFormParams,
    thread_id: str,
    server_name: str,
    turn_id: str | None = None,
) -> McpElicitationFormParams:
    """Create from MCP ElicitRequestFormParams."""
    return cls(
        message=params.message,
        requested_schema=dict(params.requested_schema),
        meta=_from_mcp_meta(params.meta),
        thread_id=thread_id,
        server_name=server_name,
        turn_id=turn_id,
    )

:fa-brands-github: Show source on GitHub