Skip to content

ThreadItemMcpToolCall

Base classes

Name Children Inherits
BaseThreadItem
codexed.models.thread_item
Base class for thread items.

⋔ Inheritance diagram

graph TD
  3039338803["thread_item.ThreadItemMcpToolCall"]
  2083311648["thread_item.BaseThreadItem"]
  3116041069["base.CodexBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2083311648 --> 3039338803
  3116041069 --> 2083311648
  3879467795 --> 3116041069
  2751680898 --> 3879467795

🛈 DocStrings

Bases: BaseThreadItem

MCP tool call item.

Source code in src/codexed/models/thread_item.py
class ThreadItemMcpToolCall(BaseThreadItem):
    """MCP tool call item."""

    type: Literal["mcpToolCall"] = "mcpToolCall"
    server: str
    tool: str
    status: McpToolCallStatus
    arguments: dict[str, Any] | None = None
    result: McpToolCallResult | None = None
    error: McpToolCallError | None = None
    duration_ms: int | None = None

    @property
    def inferred_arguments(self) -> dict[str, Any] | None:
        return self.arguments

    @property
    def item_summary(self) -> str:
        """Human-readable summary of this MCP tool call."""
        result_text = ""
        if self.result and self.result.content:
            texts = [str(b.model_dump().get("text", "")) for b in self.result.content]
            result_text = " ".join(texts)
        return f"[Tool: {self.tool}] {result_text[:100]}"

    app_context: McpToolCallAppContext | None = None
    mcp_app_resource_uri: str | None = None
    mcp_app_ui: McpAppUi | None = None
    plugin_id: str | None = None
    read_only_hint: bool | None = None

item_summary property

item_summary: str

Human-readable summary of this MCP tool call.

:fa-brands-github: Show source on GitHub