Skip to content

Commit 919c078

Browse files
fix(acp): recognize OMP xd:// device calls to T3 MCP tools
OMP mounts MCP tools as xd://mcp__<server>_<tool> devices and calls them by writing the JSON args with its built-in write tool, so T3 tool calls arrived as anonymous command executions and html_render pages never rendered. Recognize xd:// writes whose device name is a known T3 tool and take the input from the written JSON; reads of the same path stay non-MCP. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 947b8b6 commit 919c078

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎packages/provider-acp/src/server/runtimeModel.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,16 @@ export function extractMcpToolCallIdentity(
11421142
const tool = prefix === undefined ? metaToolName : metaToolName.slice(prefix.length);
11431143
return tool ? { server: metaServerId, tool } : undefined;
11441144
}
1145+
// OMP mounts MCP tools as xd://mcp__<server>_<tool> devices and calls them by writing JSON
1146+
// args; a read of the same path only fetches the tool's docs.
1147+
const devicePath = typeof rawInput?.path === "string" ? rawInput.path : "";
1148+
if (devicePath.startsWith("xd://") && typeof rawInput?.content === "string") {
1149+
const deviceTool = T3_MCP_TITLE_CALL.exec(devicePath.slice("xd://".length))?.groups?.tool;
1150+
if (deviceTool !== undefined && T3_MCP_TOOL_NAMES.has(deviceTool)) {
1151+
const input = acpMcpFallbackInput(rawInput.content);
1152+
return { server: "t3-code", tool: deviceTool, ...(input === undefined ? {} : { input }) };
1153+
}
1154+
}
11451155
const candidates = [
11461156
meta?.toolName,
11471157
claudeCode?.toolName,

0 commit comments

Comments
 (0)