The best way to control Claude Code, Codex and more from any computer or phone
fix(server): Claude MCP tools show their names and icons (#14860)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
scratchyone committed
Oct 2, 2026 at 12:39 UTC
1e7c8e0f24c217a3229615fa1de1e6ed85d7e835
8 files changed
+297
-3
apps/server/scripts/record-claude-agent-sdk-replay-fixture.ts
+9
@@ -70,6 +70,7 @@ import {
70
import { CLAUDE_BACKGROUND_MONITOR_WAKE_PROMPT } from "../src/orchestration-v2/testkit/fixtures/claude_background_monitor_wake/input.ts";
71
import { CLAUDE_NESTED_BACKGROUND_SUBAGENT_WAKE_PROMPT } from "../src/orchestration-v2/testkit/fixtures/claude_nested_background_subagent_wake/input.ts";
72
import { CLAUDE_NESTED_SUBAGENT_MODEL_PROMPT } from "../src/orchestration-v2/testkit/fixtures/claude_nested_subagent_model/input.ts";
73
+import { CLAUDE_MCP_TOOL_PRESENTATION_PROMPT } from "../src/orchestration-v2/testkit/fixtures/claude_mcp_tool_presentation/input.ts";
74
import { CLAUDE_BACKGROUND_TASK_INTERRUPT_PROMPT } from "../src/orchestration-v2/testkit/fixtures/claude_background_task_interrupt/input.ts";
75
import { CLAUDE_BACKGROUND_WAKE_BEFORE_QUEUED_PROMPT_LAUNCH_PROMPT } from "../src/orchestration-v2/testkit/fixtures/claude_background_wake_before_queued_prompt/input.ts";
76
import {
@@ -253,6 +254,14 @@ const CLAUDE_RECORDINGS = {
254
queryMode: "streaming",
255
enableTools: true,
256
},
257
+ // Needs the claude.ai Firecrawl connector on the recording account. Claude
258
+ // Code describes MCP tool uses in an undeclared `tool_use_meta` field.
259
+ claude_mcp_tool_presentation: {
260
+ prompts: [CLAUDE_MCP_TOOL_PRESENTATION_PROMPT],
261
+ defaultTranscriptFile: "fixtures/claude_mcp_tool_presentation/claude_transcript.ndjson",
262
+ queryMode: "streaming",
263
+ enableTools: true,
264
+ },
265
subagent: {
266
prompts: [SUBAGENT_PROMPT],
267
defaultTranscriptFile: "fixtures/subagent/claude_transcript.ndjson",
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts
+5
@@ -1116,6 +1116,11 @@ function sanitizeSdkMessageForReplay(input: {
1116
session_id: message.session_id,
1117
};
1118
}
1119
+ // Like init's slash_commands, the recording account's commands and skills
1120
+ // are local configuration, not protocol.
1121
+ if (message.type === "system" && message.subtype === "commands_changed") {
1122
+ return { ...message, commands: [] };
1123
+ }
1124
if (message.type === "rate_limit_event") {
1125
return {
1126
...message,
apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
+105
-2
@@ -63,6 +63,7 @@ import {
63
type ProviderUserInputAnswers,
64
type ProviderThreadId,
65
type ThreadId,
66
+ type ToolActivitySource,
67
} from "@t3tools/contracts";
68
69
import * as Cause from "effect/Cause";
@@ -2016,6 +2017,66 @@ function claudeToolUseBlocksFromAssistantMessage(
2017
return message.message.content.filter(isClaudeToolUseContentBlock);
2018
}
2019
2020
+interface ClaudeToolPresentation {
2021
+ readonly title: string;
2022
+ readonly toolSource?: ToolActivitySource;
2023
+}
2024
+
2025
+function boundedMetaText(value: unknown, maxLength: number): string | undefined {
2026
+ if (typeof value !== "string") return undefined;
2027
+ const text = value.trim().replace(/\s+/gu, " ");
2028
+ return text.length > 0 && text.length <= maxLength ? text : undefined;
2029
+}
2030
+
2031
+function metaHttpUrl(value: unknown): string | undefined {
2032
+ if (typeof value !== "string" || value.length > 4096) return undefined;
2033
+ try {
2034
+ const url = new URL(value);
2035
+ return (url.protocol === "https:" || url.protocol === "http:") && url.href.length <= 4096
2036
+ ? url.href
2037
+ : undefined;
2038
+ } catch {
2039
+ return undefined;
2040
+ }
2041
+}
2042
+
2043
+/**
2044
+ * Claude Code's own label for each tool use (the MCP tool's title, or its
2045
+ * humanized name) plus the server's name and icon. The CLI sends these as
2046
+ * `tool_use_meta` on assistant frames; the SDK types do not declare it yet.
2047
+ */
2048
+function claudeToolPresentationsFromAssistantMessage(
2049
+ message: SDKMessage,
2050
+): ReadonlyMap<string, ClaudeToolPresentation> {
2051
+ const presentations = new Map<string, ClaudeToolPresentation>();
2052
+ const meta = message.type === "assistant" ? Reflect.get(message, "tool_use_meta") : undefined;
2053
+ if (!Array.isArray(meta)) return presentations;
2054
+ for (const entry of meta) {
2055
+ if (typeof entry !== "object" || entry === null) continue;
2056
+ const id = boundedMetaText(Reflect.get(entry, "id"), 512);
2057
+ const title = boundedMetaText(Reflect.get(entry, "display_name"), 160);
2058
+ if (id === undefined || title === undefined) continue;
2059
+ const serverName = boundedMetaText(Reflect.get(entry, "server_display_name"), 160);
2060
+ const iconUrl = metaHttpUrl(Reflect.get(entry, "icon_url"));
2061
+ presentations.set(id, {
2062
+ title,
2063
+ ...(serverName === undefined
2064
+ ? {}
2065
+ : {
2066
+ toolSource: {
2067
+ key: `mcp:${serverName.toLowerCase()}`,
2068
+ name: serverName,
2069
+ kind: "integration",
2070
+ ...(iconUrl === undefined
2071
+ ? {}
2072
+ : { icon: { _tag: "themed-logo", logoUrl: iconUrl } as const }),
2073
+ },
2074
+ }),
2075
+ });
2076
+ }
2077
+ return presentations;
2078
+}
2079
+
2080
function claudeToolResultBlocksFromAssistantMessage(
2081
message: SDKMessage,
2082
): ReadonlyArray<ClaudeToolResultContentBlock> {
@@ -2619,6 +2680,7 @@ interface ActiveClaudeToolCall {
2680
readonly parentNodeId: OrchestrationV2ExecutionNode["id"];
2681
readonly ordinal: number;
2682
readonly startedAt: DateTime.Utc;
2683
+ readonly presentation?: ClaudeToolPresentation;
2684
}
2685
2686
// What is known about a subagent before its task_started registers it,
@@ -3588,6 +3650,7 @@ export function makeClaudeAdapterV2(
3650
>;
3651
readonly startedAt: DateTime.Utc;
3652
readonly updatedAt: DateTime.Utc;
3653
+ readonly presentation: ClaudeToolPresentation | undefined;
3654
}) => {
3655
const completedAt = input.status === "running" ? null : input.updatedAt;
3656
const nodeId = idAllocator.derive.nodeFromProviderItem({
@@ -3645,7 +3708,10 @@ export function makeClaudeAdapterV2(
3708
parentItemId: null,
3709
ordinal: input.ordinal,
3710
status: input.status,
3648
- title: readPath !== undefined ? formatReadToolLabel(readPath) : (searchTitle ?? null),
3711
+ title:
3712
+ readPath !== undefined
3713
+ ? formatReadToolLabel(readPath)
3714
+ : (searchTitle ?? input.presentation?.title ?? null),
3715
startedAt: input.startedAt,
3716
completedAt,
3717
updatedAt: input.updatedAt,
@@ -3708,6 +3774,9 @@ export function makeClaudeAdapterV2(
3774
: {
3775
...itemBase,
3776
type: "dynamic_tool",
3777
+ ...(input.presentation?.toolSource === undefined
3778
+ ? {}
3779
+ : { toolSource: input.presentation.toolSource }),
3780
toolName: input.toolName,
3781
...(viewedImagePath === undefined ? {} : { viewedImagePath }),
3782
input: claudeNativeToolInputValue(input.toolInput),
@@ -4378,10 +4447,38 @@ export function makeClaudeAdapterV2(
4447
readonly toolName: string;
4448
readonly toolInput: ClaudeNativeToolInput;
4449
readonly parentToolUseId: string | null;
4450
+ readonly presentation?: ClaudeToolPresentation | undefined;
4451
}) {
4452
const existing = input.context.toolCalls.get(input.nativeItemId);
4453
if (existing !== undefined) {
4384
- return existing;
4454
+ // The permission callback can start a call before its assistant
4455
+ // frame arrives with the tool's display name and icon.
4456
+ if (input.presentation === undefined || existing.presentation !== undefined) {
4457
+ return existing;
4458
+ }
4459
+ const presented = { ...existing, presentation: input.presentation };
4460
+ input.context.toolCalls.set(input.nativeItemId, presented);
4461
+ const updatedAt = yield* DateTime.now;
4462
+ yield* emitToolCallArtifacts(
4463
+ buildToolCallArtifacts({
4464
+ context: input.context,
4465
+ nativeItemId: presented.nativeItemId,
4466
+ toolName: presented.toolName,
4467
+ classification: presented.classification,
4468
+ toolInput: presented.input,
4469
+ threadId: presented.threadId,
4470
+ runId: presented.runId,
4471
+ rootNodeId: presented.rootNodeId,
4472
+ parentNodeId: presented.parentNodeId,
4473
+ ordinal: presented.ordinal,
4474
+ output: NO_CLAUDE_NATIVE_TOOL_OUTPUT,
4475
+ status: "running",
4476
+ startedAt: presented.startedAt,
4477
+ updatedAt,
4478
+ presentation: input.presentation,
4479
+ }),
4480
+ );
4481
+ return presented;
4482
}
4483
const startedAt = yield* DateTime.now;
4484
const classification = classifyClaudeNativeTool(input.toolName);
@@ -4408,6 +4505,7 @@ export function makeClaudeAdapterV2(
4505
parentNodeId,
4506
ordinal,
4507
startedAt,
4508
+ ...(input.presentation === undefined ? {} : { presentation: input.presentation }),
4509
};
4510
input.context.toolCalls.set(input.nativeItemId, toolCall);
4511
yield* emitToolCallArtifacts(
@@ -4426,6 +4524,7 @@ export function makeClaudeAdapterV2(
4524
status: "running",
4525
startedAt,
4526
updatedAt: startedAt,
4527
+ presentation: input.presentation,
4528
}),
4529
);
4530
return toolCall;
@@ -4614,6 +4713,7 @@ export function makeClaudeAdapterV2(
4713
status: "failed",
4714
startedAt: toolCall.startedAt,
4715
updatedAt: input.completedAt,
4716
+ presentation: toolCall.presentation,
4717
});
4718
yield* emitToolCallArtifacts(artifacts);
4719
}
@@ -5816,6 +5916,7 @@ export function makeClaudeAdapterV2(
5916
}
5917
}
5918
5919
+ const toolPresentations = claudeToolPresentationsFromAssistantMessage(message);
5920
for (const toolUse of claudeToolUseBlocksFromAssistantMessage(message)) {
5921
const nativeToolInput = claudeNativeToolInputFromUnknown(toolUse.input);
5922
if (toolUse.name === "Agent") {
@@ -5841,6 +5942,7 @@ export function makeClaudeAdapterV2(
5942
toolName: toolUse.name,
5943
toolInput: nativeToolInput,
5944
parentToolUseId: parentToolUseIdFromSdkMessage(message),
5945
+ presentation: toolPresentations.get(toolUse.id),
5946
});
5947
const heldPlan = heldProposedPlansByToolUseId.get(toolUse.id);
5948
if (heldPlan !== undefined) {
@@ -5904,6 +6006,7 @@ export function makeClaudeAdapterV2(
6006
status: isClaudeToolResultError(toolResult) ? "failed" : "completed",
6007
startedAt: toolCall.startedAt,
6008
updatedAt: completedAt,
6009
+ presentation: toolCall.presentation,
6010
});
6011
yield* emitToolCallArtifacts(artifacts);
6012
context.toolCalls.delete(toolCall.nativeItemId);
apps/server/src/orchestration-v2/testkit/ClaudeReplayFixtures.integration.test.ts
+2
-1
@@ -211,7 +211,8 @@ describe("Claude Agent SDK replay fixtures", () => {
211
for (const toolName of claudeToolUseNamesFromTranscript(transcript)) {
212
seenToolNames.add(toolName);
213
const classification = classifyClaudeNativeTool(toolName);
214
- if (!classification.known) {
214
+ // MCP tools are open-ended and deliberately become dynamic tools.
215
+ if (!classification.known && !toolName.startsWith("mcp__")) {
216
unknownToolNames.add(`${fixture.name}:${toolName}`);
217
}
218
}
apps/server/src/orchestration-v2/testkit/fixtures/claude_mcp_tool_presentation/claude_transcript.ndjson
new
+94
@@ -0,0 +1,94 @@
1
+{"type":"transcript_start","provider":"claudeAgent","protocol":"claude-agent-sdk.query","version":"0.2.111","scenario":"claude_mcp_tool_presentation","metadata":{"prompts":["Do exactly this, one tool call at a time, with no other tool calls:\n1) Call the Firecrawl firecrawl_scrape tool on https://example.com with formats [\"markdown\"].\n2) Call the Firecrawl firecrawl_map tool on https://example.com with limit 1.\n3) Reply with exactly: mcp presentation fixture complete"],"model":"claude-sonnet-4-6","nativeSessionId":"e51402d3-25be-4866-81d5-2ab30cecb268","queryMode":"streaming","tools":"claude_code","permissionMode":"bypassPermissions","handEdits":["Removed tool_use_meta from the firecrawl_map assistant frame, standing in for a Claude Code build that sends no display metadata for an MCP tool."],"generatedBy":"recordClaudeAgentSdkReplayTranscript"}}
2
+{"type":"expect_outbound","label":"query.open","frame":{"type":"query.open","options":{"model":"claude-sonnet-4-6","tools":{"type":"preset","preset":"claude_code"},"permissionMode":"bypassPermissions","settings":{"showThinkingSummaries":true},"allowDangerouslySkipPermissions":true,"sessionId":"e51402d3-25be-4866-81d5-2ab30cecb268"}}}
3
+{"type":"expect_outbound","label":"prompt.offer:1","frame":{"type":"prompt.offer","message":{"type":"user","message":{"role":"user","content":"Do exactly this, one tool call at a time, with no other tool calls:\n1) Call the Firecrawl firecrawl_scrape tool on https://example.com with formats [\"markdown\"].\n2) Call the Firecrawl firecrawl_map tool on https://example.com with limit 1.\n3) Reply with exactly: mcp presentation fixture complete"},"parent_tool_use_id":null,"uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}}
4
+{"type":"emit_inbound","label":"command_lifecycle","frame":{"type":"command_lifecycle","command_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a","state":"queued","uuid":"042fc299-7a91-42e7-a7c8-7ad83c342c61","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268"}}
5
+{"type":"emit_inbound","label":"rate_limit_event","frame":{"type":"rate_limit_event","rate_limit_info":{"status":"allowed"},"uuid":"16a8e60b-317a-4de1-b45e-2707aebd957e","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268"}}
6
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"commands_changed","commands":[],"uuid":"5882c810-a76d-43ef-a7d8-20a4ce7272f7","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268"}}
7
+{"type":"emit_inbound","label":"command_lifecycle","frame":{"type":"command_lifecycle","command_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a","state":"started","uuid":"0b876c44-1d79-45b9-84e1-8ac9d006e1eb","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268"}}
8
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"init","agents":[],"apiKeySource":"none","claude_code_version":"2.1.282","cwd":"/tmp/claude-replay-claude_mcp_tool_presentation","tools":[],"mcp_servers":[],"model":"claude-sonnet-4-6","permissionMode":"bypassPermissions","slash_commands":[],"output_style":"default","skills":[],"plugins":[],"fast_mode_state":"off","uuid":"17b07fd4-a49e-4f29-908d-2eb4e79079f2","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268"}}
9
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"status","status":"requesting","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"25df71c1-b001-403e-bd02-20f7a131e6be"}}
10
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_start","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyMTdhN1SHi8KRaXCaz","type":"message","role":"assistant","content":[],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":13908,"cache_read_input_tokens":120650,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":13908},"output_tokens":8,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"ee9a690a-66c6-419c-beb6-178282c2b2d6","ttft_ms":1398,"user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a","user_message_uuids":["8935142f-0551-46e6-9a6b-95034332fa1a"]}}
11
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"5531e320-0b9f-44ed-bb84-9217aec3a7de"}}
12
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":1,"estimated_tokens_delta":1,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"e131358c-9526-42f7-9893-a9f21c8da7b1","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
13
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"The","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"4e3389b2-8998-4002-9b79-7e4cba7710cf"}}
14
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":6,"estimated_tokens_delta":5,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"c8a1f6f6-779c-4464-944c-224cfa5ff337","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
15
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" user wants me to do","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"b0fc7c7a-7e9f-4703-be79-2a84a1ae779c"}}
16
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":10,"estimated_tokens_delta":4,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"b8bff8ce-d9d9-42cf-8531-eca61d512198","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
17
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" exactly three","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"8d7902d0-2c10-4f31-b104-325f009187a7"}}
18
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":12,"estimated_tokens_delta":2,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"803f3856-8179-4080-9fbd-cbd2446c94e6","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
19
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" things","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"27f9d2ee-21cb-4d7d-8ef6-e2dd7c8c013b"}}
20
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":13,"estimated_tokens_delta":1,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"b15bdd50-2536-4142-89d4-0968478a199d","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
21
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" in","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"c8d8ea67-b12c-47f8-b3b2-39e6a1d649bb"}}
22
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":16,"estimated_tokens_delta":3,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"9f07ec5f-2c77-4f10-9732-86d72b2023ce","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
23
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" sequence,","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"5678559a-f58c-4ad5-a601-ea66ddf38a29"}}
24
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":23,"estimated_tokens_delta":7,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"c0512ed5-0470-4688-b424-d87248fc558b","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
25
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" one tool call at a time:","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"488b1f98-da86-496f-8808-b97a17e548eb"}}
26
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":26,"estimated_tokens_delta":3,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"53e7bbf1-7787-436d-bb2f-fb227d9ec08e","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
27
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"\n1. Call fi","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"95bcdca5-05da-4af8-8476-db503f8634d3"}}
28
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":31,"estimated_tokens_delta":5,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"1b44ef1e-7a1b-4f9f-b31f-2827e1cd4b98","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
29
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"recrawl_scrape on","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"0ca78758-21a6-4278-8647-17346dc8b7a9"}}
30
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":40,"estimated_tokens_delta":9,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"263d1905-60db-44fb-bb8a-aff133cfd1c5","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
31
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" https://example.com with formats [\"","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"2a487a60-db75-4949-bf04-abd72be141c9"}}
32
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":46,"estimated_tokens_delta":6,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"26b28799-60aa-4402-b4cf-6131ac9208c0","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
33
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"markdown\"]\n2. Call firec","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"47c553fa-1067-4ec1-9d03-43c179ab77c1"}}
34
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":53,"estimated_tokens_delta":7,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"8b22a64d-0ff3-42a0-8bf9-cf334970484c","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
35
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"rawl_map on https://example","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"85ff3f48-9b5f-4bfb-9424-304286e6feb9"}}
36
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":58,"estimated_tokens_delta":5,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"27537bbc-ea6d-4ab2-82fa-a1d155e47c24","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
37
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":".com with limit 1\n3","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"9228b117-54b5-4735-91c0-36c2c8ab3589"}}
38
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":62,"estimated_tokens_delta":4,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"dc661ed1-0053-4137-9ba3-b047fc5673a2","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
39
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":". Reply with \"","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"1f3a14f3-ab46-4901-bd67-01ccc56e9e53"}}
40
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":72,"estimated_tokens_delta":10,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"c8752e2c-b468-4565-83d6-b0cf93958dcc","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
41
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"mcp presentation fixture complete\"\n\nLet","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"799ac3de-dc15-456b-ba7f-7ed646091650"}}
42
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":74,"estimated_tokens_delta":2,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"252003d8-27ca-459d-83d2-76c3954ab781","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
43
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" me do","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"98477c6a-267d-47ec-9ab9-23b6ac9ed9be"}}
44
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":76,"estimated_tokens_delta":2,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"79faa185-c65f-4d35-902b-e90c67e71328","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
45
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" these","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"61e9467c-47a6-47ac-b1a8-3fbd2c4017cb"}}
46
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":80,"estimated_tokens_delta":4,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"62df28bc-7825-4c68-bf8c-2c55330e8bcd","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
47
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":" one at a time.","estimated_tokens":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"e81841c1-d71a-4f05-8e3e-ccc487761c94"}}
48
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"thinking_tokens","estimated_tokens":144,"estimated_tokens_delta":64,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"7c601f46-605b-46d4-afcd-459d3a0778a4","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a"}}
49
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"ErcECqoBCBIYAipAr/7SWAcYeXs7o2aRtpsjID+2LXjJzbSBehaQmjIpalZdQ/zDlKo5HdSV5/hjsXI5PLCptKaONWLOUH72laOx2jIRY2xhdWRlLXNvbm5ldC00LTY4AEIIdGhpbmtpbmdaJGFmOTIzNWNiLWRjNTItNDViMC05MTI2LTNmZTBkZmJmNzNkY3IQOUPUj6Q5Zqq7Ny6ZW11Rk4gBAagBgLTv1QawAQISDFxgTUNaIxrJGThAcxoM1pccePQyi26dbGkQIjBasphSlIQMWY/cGUpkz8rfvlDWGHElBlHgWxNzbEs5sHqyq/gMPFYpuu1VfCUuRXgquQKpt01uhZkzPA91ZoWdnE2uwB9CP7DrueotB4xeqPC8If0jI7EU2E52jEO9FJvPWKvrv40DPI9dUyAT82i3QfMfVbmslyw8lWv8JFmjod4MPRdI3DBj8zDztU+YRjtKMiy91u5NG5oJyI4M8DLrsVD7WRpA3BEb5vREl15X8T41rhYh14w8TXglDpEXgwPsJUd6+oJhR3dYrX71pdj6JILMrh0xQ1WNVm+fSXDIYxCUV8wmerH1ewTP4FwLip1icXtGi8lQSYjKT0hnNlPgMG13AbSMM/dI3A50XB8FighdGSaY+OoKZuZWfOA6XeNRUqKi6qaUb5eJnV0UsvSfxe++TgvGiaQubZ0NQm0GRcSz5LHJBxccNcaLBnqEp5l4Y7fQ2Lo/Kwzgndnq21jXyVpPEd0OcsQOzCxsGAE="}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"941464bd-9b05-453c-8ee7-1529998aac44"}}
50
+{"type":"emit_inbound","label":"assistant","frame":{"type":"assistant","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyMTdhN1SHi8KRaXCaz","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"The user wants me to do exactly three things in sequence, one tool call at a time:\n1. Call firecrawl_scrape on https://example.com with formats [\"markdown\"]\n2. Call firecrawl_map on https://example.com with limit 1\n3. Reply with \"mcp presentation fixture complete\"\n\nLet me do these one at a time.","signature":"ErcECqoBCBIYAipAr/7SWAcYeXs7o2aRtpsjID+2LXjJzbSBehaQmjIpalZdQ/zDlKo5HdSV5/hjsXI5PLCptKaONWLOUH72laOx2jIRY2xhdWRlLXNvbm5ldC00LTY4AEIIdGhpbmtpbmdaJGFmOTIzNWNiLWRjNTItNDViMC05MTI2LTNmZTBkZmJmNzNkY3IQOUPUj6Q5Zqq7Ny6ZW11Rk4gBAagBgLTv1QawAQISDFxgTUNaIxrJGThAcxoM1pccePQyi26dbGkQIjBasphSlIQMWY/cGUpkz8rfvlDWGHElBlHgWxNzbEs5sHqyq/gMPFYpuu1VfCUuRXgquQKpt01uhZkzPA91ZoWdnE2uwB9CP7DrueotB4xeqPC8If0jI7EU2E52jEO9FJvPWKvrv40DPI9dUyAT82i3QfMfVbmslyw8lWv8JFmjod4MPRdI3DBj8zDztU+YRjtKMiy91u5NG5oJyI4M8DLrsVD7WRpA3BEb5vREl15X8T41rhYh14w8TXglDpEXgwPsJUd6+oJhR3dYrX71pdj6JILMrh0xQ1WNVm+fSXDIYxCUV8wmerH1ewTP4FwLip1icXtGi8lQSYjKT0hnNlPgMG13AbSMM/dI3A50XB8FighdGSaY+OoKZuZWfOA6XeNRUqKi6qaUb5eJnV0UsvSfxe++TgvGiaQubZ0NQm0GRcSz5LHJBxccNcaLBnqEp5l4Y7fQ2Lo/Kwzgndnq21jXyVpPEd0OcsQOzCxsGAE="}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":13908,"cache_read_input_tokens":120650,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":13908},"output_tokens":8,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"95deaf17-0eb1-4b10-9b64-4b3d86784821","timestamp":"2026-09-29T15:32:16.925Z","user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a","user_message_uuids":["8935142f-0551-46e6-9a6b-95034332fa1a"]}}
51
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_stop","index":0},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"e33d797d-cb58-4208-b4a1-6997bf585ee2"}}
52
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_start","index":1,"content_block":{"type":"tool_use","id":"toolu_01CqVNFCESeShHVUiLMLPsCg","name":"mcp__claude_ai_Firecrawl__firecrawl_scrape","input":{},"caller":{"type":"direct"}}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"9d628e2d-81bf-4206-b587-0cff5caf1aed"}}
53
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":""}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"b5f7700a-9aff-44cf-96d9-1655cad51f8a"}}
54
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"{\"url\":"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"fc274f0d-de9c-44d8-b142-4f8e21bd3427"}}
55
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":" \"https"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"41ef7bfc-f8c4-4c0d-98d9-146e4a4cc394"}}
56
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"://exam"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"9a63da1a-67d1-43d6-951d-f1c60e112a62"}}
57
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"ple.com"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"7891419a-e906-43be-84b0-4b2f16be6223"}}
58
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\""}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"1a5d24aa-f26c-4e17-b5cc-f122c8261b2e"}}
59
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":", \"form"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"229e2bfe-a912-4a27-9f25-49f14fdafe24"}}
60
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"ats\": ["}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"cf50db11-2827-4ed7-8407-0cbecb3c8c31"}}
61
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"\"markdo"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"39a14b30-36a6-462c-ad1d-1a07bf08403d"}}
62
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":1,"delta":{"type":"input_json_delta","partial_json":"wn\"]}"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"a9ed2753-02fb-48cc-9425-d0ea87e23fd1"}}
63
+{"type":"emit_inbound","label":"assistant","frame":{"type":"assistant","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyMTdhN1SHi8KRaXCaz","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01CqVNFCESeShHVUiLMLPsCg","name":"mcp__claude_ai_Firecrawl__firecrawl_scrape","input":{"url":"https://example.com","formats":["markdown"]},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":3,"cache_creation_input_tokens":13908,"cache_read_input_tokens":120650,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":13908},"output_tokens":8,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"61e61e08-0d57-4e0b-9685-0000f4eb29a0","timestamp":"2026-09-29T15:32:17.004Z","wire_tool_inputs":{"toolu_01CqVNFCESeShHVUiLMLPsCg":{"url":"https://example.com","formats":["markdown"]}},"tool_use_meta":[{"id":"toolu_01CqVNFCESeShHVUiLMLPsCg","display_name":"Firecrawl scrape","server_display_name":"Firecrawl","icon_url":"https://www.google.com/s2/favicons?domain=firecrawl.dev&sz=64"}]}}
64
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_stop","index":1},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"2429ac0f-a65e-401a-a3b1-3eed4a37f28d"}}
65
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"container":null},"usage":{"input_tokens":3,"cache_creation_input_tokens":13908,"cache_read_input_tokens":120650,"output_tokens":191,"output_tokens_details":{"thinking_tokens":95},"iterations":[{"input_tokens":3,"output_tokens":191,"cache_read_input_tokens":120650,"cache_creation_input_tokens":13908,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":13908},"type":"message"}]},"context_management":{"applied_edits":[]}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"50843da5-a0f0-4e95-a344-f841aa6d9499"}}
66
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_stop"},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"f5993155-901f-4e2d-a3a9-4d5b23c1bbf5"}}
67
+{"type":"emit_inbound","label":"user","frame":{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01CqVNFCESeShHVUiLMLPsCg","type":"tool_result","content":"{\"markdown\":\"Thisdomainisforuseindocumentationexampleswithoutneedingpermission.Thisisnotaservice,avoidrelyingonitfortestingandmonitoringpurposes.\\n\\nهذا النطاق مُخصص للاستخدام في أمثلة التوثيق دون الحاجة إلى إذن. هذه ليست خدمة، يُرجى تجنب الاعتماد عليها لأغراض الاختبار والمراقبة.\\n\\n该域名仅用于文档示例,无需获得许可。这并非一项服务,请勿将其用于测试和监控目的。\\n\\nL’usagedecedomaineestréservéàdesexemplesdedocumentation,sansautorisationpréalable.Ilnes’agitpasd’unservice;sonutilisationàdesfinsdetestoudesurveillanceestàéviter.\\n\\nДанныйдоменпредназначендляиспользованиявпримерахдокументациибезнеобходимостиполученияпредварительногоразрешения.Этонесервис;нерекомендуетсяегоиспользованиедлятестированияимониторинга.\\n\\nEstedominioestádestinadoalusoenejemplosdedocumentaciónsinnecesidaddepermiso.Estonoesunservicio,evitarutilizarlopararealizarpruebasomonitoreos.\\n\\n [Learn more](https://iana.org/help/example-domains)\",\"metadata\":{\"viewport\":\"width=device-width,initial-scale=1\",\"title\":\"Example Domain\",\"language\":\"en\",\"favicon\":\"data:,\",\"scrapeId\":\"01a0edcb-958c-76df-93e9-f9d9dbd6ae55\",\"sourceURL\":\"https://example.com\",\"url\":\"https://example.com/\",\"statusCode\":200,\"contentType\":\"text/html; charset=utf-8\",\"proxyUsed\":\"basic\",\"cacheState\":\"hit\",\"cachedAt\":\"2026-09-29T15:32:11.421Z\",\"creditsUsed\":1,\"concurrencyLimited\":false}}"}]},"parent_tool_use_id":null,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"863025d4-d60a-4ea5-95e5-7fb64a0b386a","timestamp":"2026-09-29T15:32:17.556Z","tool_use_result":{"content":"{\"markdown\":\"Thisdomainisforuseindocumentationexampleswithoutneedingpermission.Thisisnotaservice,avoidrelyingonitfortestingandmonitoringpurposes.\\n\\nهذا النطاق مُخصص للاستخدام في أمثلة التوثيق دون الحاجة إلى إذن. هذه ليست خدمة، يُرجى تجنب الاعتماد عليها لأغراض الاختبار والمراقبة.\\n\\n该域名仅用于文档示例,无需获得许可。这并非一项服务,请勿将其用于测试和监控目的。\\n\\nL’usagedecedomaineestréservéàdesexemplesdedocumentation,sansautorisationpréalable.Ilnes’agitpasd’unservice;sonutilisationàdesfinsdetestoudesurveillanceestàéviter.\\n\\nДанныйдоменпредназначендляиспользованиявпримерахдокументациибезнеобходимостиполученияпредварительногоразрешения.Этонесервис;нерекомендуетсяегоиспользованиедлятестированияимониторинга.\\n\\nEstedominioestádestinadoalusoenejemplosdedocumentaciónsinnecesidaddepermiso.Estonoesunservicio,evitarutilizarlopararealizarpruebasomonitoreos.\\n\\n [Learn more](https://iana.org/help/example-domains)\",\"metadata\":{\"viewport\":\"width=device-width,initial-scale=1\",\"title\":\"Example Domain\",\"language\":\"en\",\"favicon\":\"data:,\",\"scrapeId\":\"01a0edcb-958c-76df-93e9-f9d9dbd6ae55\",\"sourceURL\":\"https://example.com\",\"url\":\"https://example.com/\",\"statusCode\":200,\"contentType\":\"text/html; charset=utf-8\",\"proxyUsed\":\"basic\",\"cacheState\":\"hit\",\"cachedAt\":\"2026-09-29T15:32:11.421Z\",\"creditsUsed\":1,\"concurrencyLimited\":false}}","structuredContent":{"markdown":"Thisdomainisforuseindocumentationexampleswithoutneedingpermission.Thisisnotaservice,avoidrelyingonitfortestingandmonitoringpurposes.\n\nهذا النطاق مُخصص للاستخدام في أمثلة التوثيق دون الحاجة إلى إذن. هذه ليست خدمة، يُرجى تجنب الاعتماد عليها لأغراض الاختبار والمراقبة.\n\n该域名仅用于文档示例,无需获得许可。这并非一项服务,请勿将其用于测试和监控目的。\n\nL’usagedecedomaineestréservéàdesexemplesdedocumentation,sansautorisationpréalable.Ilnes’agitpasd’unservice;sonutilisationàdesfinsdetestoudesurveillanceestàéviter.\n\nДанныйдоменпредназначендляиспользованиявпримерахдокументациибезнеобходимостиполученияпредварительногоразрешения.Этонесервис;нерекомендуетсяегоиспользованиедлятестированияимониторинга.\n\nEstedominioestádestinadoalusoenejemplosdedocumentaciónsinnecesidaddepermiso.Estonoesunservicio,evitarutilizarlopararealizarpruebasomonitoreos.\n\n [Learn more](https://iana.org/help/example-domains)","metadata":{"viewport":"width=device-width,initial-scale=1","title":"Example Domain","language":"en","favicon":"data:,","scrapeId":"01a0edcb-958c-76df-93e9-f9d9dbd6ae55","sourceURL":"https://example.com","url":"https://example.com/","statusCode":200,"contentType":"text/html; charset=utf-8","proxyUsed":"basic","cacheState":"hit","cachedAt":"2026-09-29T15:32:11.421Z","creditsUsed":1,"concurrencyLimited":false}}}}}
68
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"status","status":"requesting","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"cece3d42-d089-4279-89b6-cc1ecfcfa1de"}}
69
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_start","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyMiXtkRS4bQYoe7LVs","type":"message","role":"assistant","content":[],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":787,"cache_read_input_tokens":134558,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":787},"output_tokens":37,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"dc3467a0-7e44-4bbc-a952-84aeae32d2c9","ttft_ms":2543}}
70
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_start","index":0,"content_block":{"type":"tool_use","id":"toolu_019X6ALn5NrExXqfhzC3LHCP","name":"mcp__claude_ai_Firecrawl__firecrawl_map","input":{},"caller":{"type":"direct"}}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"ade642dc-47a3-4cc8-ab74-a78d1ddb4917"}}
71
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":""}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"3b9a9dc0-2368-4ea0-8bdb-99b40333405a"}}
72
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"{\"url\":"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"30cfa68f-ba26-49b4-817c-2360cb007e55"}}
73
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":" \"https"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"b5c6bb6f-2e1b-4eeb-9cd6-8c715de7dec2"}}
74
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"://exam"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"106034cd-4582-48b1-9ac7-5fd3334e93d2"}}
75
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"ple.com"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"80eda895-c023-415c-9393-c58d70e82b38"}}
76
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"\""}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"36249eb1-accf-414b-88f1-b7f2f55c68a2"}}
77
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":", \"limi"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"21b45389-6404-4e93-8e1b-700e996bfbb5"}}
78
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"input_json_delta","partial_json":"t\": 1}"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"493d77b0-2e83-47fe-a953-c6e7cb2eda59"}}
79
+{"type":"emit_inbound","label":"assistant","frame":{"type":"assistant","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyMiXtkRS4bQYoe7LVs","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_019X6ALn5NrExXqfhzC3LHCP","name":"mcp__claude_ai_Firecrawl__firecrawl_map","input":{"url":"https://example.com","limit":1},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":787,"cache_read_input_tokens":134558,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":787},"output_tokens":37,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"0b290b49-0022-43e3-a828-aedb55fdd349","timestamp":"2026-09-29T15:32:20.649Z","wire_tool_inputs":{"toolu_019X6ALn5NrExXqfhzC3LHCP":{"url":"https://example.com","limit":1}}}}
80
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_stop","index":0},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"864fb881-63f5-4b90-9c77-1e725ab597a4"}}
81
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_delta","delta":{"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"container":null},"usage":{"input_tokens":1,"cache_creation_input_tokens":787,"cache_read_input_tokens":134558,"output_tokens":90,"output_tokens_details":{"thinking_tokens":0},"iterations":[{"input_tokens":1,"output_tokens":90,"cache_read_input_tokens":134558,"cache_creation_input_tokens":787,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":787},"type":"message"}]},"context_management":{"applied_edits":[]}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"f89382a7-88b9-4b7c-8a34-844fd01020c0"}}
82
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_stop"},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"9557dc84-46de-4ae5-8d21-c75b8d931ddb"}}
83
+{"type":"emit_inbound","label":"user","frame":{"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_019X6ALn5NrExXqfhzC3LHCP","type":"tool_result","content":"{\"links\":[{\"url\":\"https://example.com/\",\"title\":\"Example Domain\"}],\"id\":\"01a0edcb-a3ec-762d-b334-eac9eaf6e0e2\"}"}]},"parent_tool_use_id":null,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"e11ebe37-f6cc-4566-b1d3-1ef09fe3b555","timestamp":"2026-09-29T15:32:21.366Z","tool_use_result":{"content":"{\"links\":[{\"url\":\"https://example.com/\",\"title\":\"Example Domain\"}],\"id\":\"01a0edcb-a3ec-762d-b334-eac9eaf6e0e2\"}","structuredContent":{"links":[{"url":"https://example.com/","title":"Example Domain"}],"id":"01a0edcb-a3ec-762d-b334-eac9eaf6e0e2"}}}}
84
+{"type":"emit_inbound","label":"system","frame":{"type":"system","subtype":"status","status":"requesting","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"5bc88c9e-c3a2-4f4c-9627-526f1328149d"}}
85
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_start","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyN16JbrX8sT6DrKgDY","type":"message","role":"assistant","content":[],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":153,"cache_read_input_tokens":135345,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":153},"output_tokens":1,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"29cd9f10-713b-4fa5-b078-cf002afa0f36","ttft_ms":1348}}
86
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"3d567d6d-5900-46b1-93fc-d7fa3af9a497"}}
87
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"m"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"c0fe9b4c-25ad-4b78-9ec7-46ee5ec7902c"}}
88
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"cp presentation fixture complete"}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"2d9455f8-b3ae-4745-975a-364397a78a48"}}
89
+{"type":"emit_inbound","label":"assistant","frame":{"type":"assistant","message":{"model":"claude-sonnet-4-6","id":"msg_011CfXyN16JbrX8sT6DrKgDY","type":"message","role":"assistant","content":[{"type":"text","text":"mcp presentation fixture complete"}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":1,"cache_creation_input_tokens":153,"cache_read_input_tokens":135345,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":153},"output_tokens":1,"service_tier":"standard","inference_geo":"not_available"},"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","uuid":"9e83bfdd-927a-4434-bc3e-7065c7fd4198","timestamp":"2026-09-29T15:32:22.734Z"}}
90
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"content_block_stop","index":0},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"ba30c145-2f37-42a3-a72c-88bfb16d1b63"}}
91
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null,"stop_details":null,"container":null},"usage":{"input_tokens":1,"cache_creation_input_tokens":153,"cache_read_input_tokens":135345,"output_tokens":8,"output_tokens_details":{"thinking_tokens":0},"iterations":[{"input_tokens":1,"output_tokens":8,"cache_read_input_tokens":135345,"cache_creation_input_tokens":153,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":153},"type":"message"}]},"context_management":{"applied_edits":[]}},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"4275a6ef-1a6a-488d-82ab-5c5f04ef272a"}}
92
+{"type":"emit_inbound","label":"stream_event","frame":{"type":"stream_event","event":{"type":"message_stop"},"session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","parent_tool_use_id":null,"uuid":"c82d8732-2755-4c3c-8447-ece5d38ee460"}}
93
+{"type":"emit_inbound","label":"result","frame":{"duration_api_ms":8468,"stop_reason":"end_turn","session_id":"e51402d3-25be-4866-81d5-2ab30cecb268","total_cost_usd":0.2111049,"usage":{"input_tokens":5,"cache_creation_input_tokens":14848,"cache_read_input_tokens":390553,"output_tokens":289,"output_tokens_details":{"thinking_tokens":95},"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":14848,"ephemeral_5m_input_tokens":0},"inference_geo":"not_available","iterations":[{"input_tokens":1,"output_tokens":8,"cache_read_input_tokens":135345,"cache_creation_input_tokens":153,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":153},"type":"message"}],"speed":"standard"},"modelUsage":{"claude-sonnet-4-6":{"inputTokens":8,"outputTokens":300,"cacheReadInputTokens":391643,"cacheCreationInputTokens":14848,"webSearchRequests":0,"costUSD":0.2111049,"contextWindow":200000,"maxOutputTokens":32000,"thinkingTokens":95,"canonicalModel":"claude-sonnet-4-6","provider":"firstParty","costBasis":"list"}},"permission_denials":[],"terminal_reason":"completed","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required","subagent_stats":{"spawned":0,"requested":{"background":0,"foreground":0,"unset":0},"started_in_background":0,"max_depth":0,"spawned_by_subagents":0,"completed":0,"failed":0,"killed":{"parent":0,"user":0,"system":0},"refused":{"depth_limit":0,"concurrency_limit":0,"budget":0},"by_type":{}},"is_error":false,"num_turns":3,"subtype":"success","api_error_status":null,"result":"mcp presentation fixture complete","ttft_ms":2932,"type":"result","duration_ms":8858,"uuid":"4561c900-5246-467b-8b6a-b16f2a116f64","ttft_stream_ms":1429,"time_to_request_ms":31,"first_content_frame_ms":1429,"user_message_uuid":"8935142f-0551-46e6-9a6b-95034332fa1a","user_message_uuids":["8935142f-0551-46e6-9a6b-95034332fa1a"],"request_sent_wall_ms":1790695934024,"queued_turn_count":0,"result_index":0}}
94
+{"type":"runtime_exit","status":"success"}
apps/server/src/orchestration-v2/testkit/fixtures/claude_mcp_tool_presentation/input.ts
new
+14
@@ -0,0 +1,14 @@
1
+import type { OrchestratorFixtureInput } from "../shared.ts";
2
+
3
+export const CLAUDE_MCP_TOOL_PRESENTATION_PROMPT = [
4
+ "Do exactly this, one tool call at a time, with no other tool calls:",
5
+ '1) Call the Firecrawl firecrawl_scrape tool on https://example.com with formats ["markdown"].',
6
+ "2) Call the Firecrawl firecrawl_map tool on https://example.com with limit 1.",
7
+ "3) Reply with exactly: mcp presentation fixture complete",
8
+].join("\n");
9
+
10
+export function claudeMcpToolPresentationInput(): OrchestratorFixtureInput {
11
+ return {
12
+ steps: [{ type: "message", text: CLAUDE_MCP_TOOL_PRESENTATION_PROMPT }],
13
+ };
14
+}
apps/server/src/orchestration-v2/testkit/fixtures/claude_mcp_tool_presentation/output.ts
new
+51
@@ -0,0 +1,51 @@
1
+import { assert } from "@effect/vitest";
2
+import type { ProviderReplayTranscript } from "@t3tools/contracts";
3
+
4
+import type { OrchestratorV2ScenarioResult } from "../../OrchestratorScenario.ts";
5
+import {
6
+ assertBaseProjection,
7
+ assertSemanticProjectionIntegrity,
8
+ assertUserMessagesInclude,
9
+ assertVisibleTurnItemsMirrorLocalTurnItems,
10
+ projectionFor,
11
+} from "../shared.ts";
12
+import { CLAUDE_MCP_TOOL_PRESENTATION_PROMPT } from "./input.ts";
13
+
14
+// The scrape frame carries Claude Code's `tool_use_meta` as recorded. The map
15
+// frame's entry was removed from the recording, so it stands in for an MCP
16
+// tool Claude Code sends no display metadata for.
17
+export function assertClaudeMcpToolPresentationOutput(
18
+ result: OrchestratorV2ScenarioResult,
19
+ transcript: ProviderReplayTranscript,
20
+) {
21
+ assertBaseProjection({ result, transcript, runCount: 1, runStatuses: ["completed"] });
22
+ const projection = projectionFor(result, transcript.scenario);
23
+ assertSemanticProjectionIntegrity(projection);
24
+ assertVisibleTurnItemsMirrorLocalTurnItems(projection);
25
+ assertUserMessagesInclude(projection, [CLAUDE_MCP_TOOL_PRESENTATION_PROMPT]);
26
+
27
+ const tools = projection.turnItems.flatMap((item) =>
28
+ item.type === "dynamic_tool" ? [item] : [],
29
+ );
30
+ assert.deepEqual(
31
+ tools.map((item) => item.toolName),
32
+ ["mcp__claude_ai_Firecrawl__firecrawl_scrape", "mcp__claude_ai_Firecrawl__firecrawl_map"],
33
+ );
34
+ const [scrape, map] = tools;
35
+
36
+ assert.equal(scrape?.status, "completed");
37
+ assert.equal(scrape?.title, "Firecrawl scrape");
38
+ assert.deepEqual(scrape?.toolSource, {
39
+ key: "mcp:firecrawl",
40
+ name: "Firecrawl",
41
+ kind: "integration",
42
+ icon: {
43
+ _tag: "themed-logo",
44
+ logoUrl: "https://www.google.com/s2/favicons?domain=firecrawl.dev&sz=64",
45
+ },
46
+ });
47
+
48
+ assert.equal(map?.status, "completed");
49
+ assert.isNull(map?.title);
50
+ assert.notProperty(map, "toolSource");
51
+}
apps/server/src/orchestration-v2/testkit/fixtures/index.ts
+17
@@ -32,6 +32,8 @@ import { claudeNestedBackgroundSubagentWakeInput } from "./claude_nested_backgro
32
import { assertClaudeNestedBackgroundSubagentWakeOutput } from "./claude_nested_background_subagent_wake/output.ts";
33
import { claudeNestedSubagentModelInput } from "./claude_nested_subagent_model/input.ts";
34
import { assertClaudeNestedSubagentModelOutput } from "./claude_nested_subagent_model/output.ts";
35
+import { claudeMcpToolPresentationInput } from "./claude_mcp_tool_presentation/input.ts";
36
+import { assertClaudeMcpToolPresentationOutput } from "./claude_mcp_tool_presentation/output.ts";
37
import { claudeResultIsErrorInput } from "./claude_result_is_error/input.ts";
38
import { assertClaudeResultIsErrorOutput } from "./claude_result_is_error/output.ts";
39
import { grokAutoBlockedCommandInput } from "./grok_auto_blocked_command/input.ts";
@@ -421,6 +423,21 @@ export const ORCHESTRATOR_REPLAY_FIXTURES: ReadonlyArray<OrchestratorReplayFixtu
423
},
424
],
425
},
426
+ {
427
+ name: "claude_mcp_tool_presentation",
428
+ buildInput: claudeMcpToolPresentationInput,
429
+ providers: [
430
+ {
431
+ driver: ProviderDriverKind.make("claudeAgent"),
432
+ transcriptFile: new URL(
433
+ "./claude_mcp_tool_presentation/claude_transcript.ndjson",
434
+ import.meta.url,
435
+ ),
436
+ modelSelection: CLAUDE_MODEL_SELECTION,
437
+ assertOutput: assertClaudeMcpToolPresentationOutput,
438
+ },
439
+ ],
440
+ },
441
{
442
name: "claude_idle_resume",
443
buildInput: claudeIdleResumeInput,