diff --git a/packages/ui/src/features/mcp-apps/components/McpToolView.tsx b/packages/ui/src/features/mcp-apps/components/McpToolView.tsx
index fb460f2b3..94057696b 100644
--- a/packages/ui/src/features/mcp-apps/components/McpToolView.tsx
+++ b/packages/ui/src/features/mcp-apps/components/McpToolView.tsx
@@ -1,17 +1,14 @@
import { Plugs } from "@phosphor-icons/react";
-import { Box, Flex } from "@radix-ui/themes";
-import { useState } from "react";
import {
getPostHogExecDisplay,
isPostHogExecTool,
} from "../../posthog-mcp/utils/posthog-exec-display";
+import { ToolRow } from "../../sessions/components/session-update/ToolRow";
import {
+ ContentPre,
compactInput,
- ExpandableIcon,
- ExpandedContentBox,
formatInput,
getContentText,
- StatusIndicators,
stripCodeFences,
ToolTitle,
type ToolViewProps,
@@ -33,7 +30,6 @@ export function McpToolView({
mcpToolName,
expanded = false,
}: McpToolViewProps) {
- const [isExpanded, setIsExpanded] = useState(expanded);
const { status, rawInput, content } = toolCall;
const { isLoading, isFailed, wasCancelled, isComplete } = useToolCallStatus(
status,
@@ -60,52 +56,40 @@ export function McpToolView({
const output = stripCodeFences(getContentText(content) ?? "");
const hasOutput = output.trim().length > 0;
- const isExpandable = !!fullInput || hasOutput;
+ const showOutput = isComplete && hasOutput;
- const handleClick = () => {
- if (isExpandable) {
- setIsExpanded(!isExpanded);
- }
- };
+ const body =
+ fullInput || showOutput ? (
+ <>
+ {fullInput &&