Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/services/tools/toolExecution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1473,10 +1473,8 @@ async function checkPermissionsAndCallTool(
})
}

// TOOD(hackyon): refactor so we don't have different experiences for MCP tools
if (!isMcpTool(tool)) {
await addToolResult(toolOutput, mappedToolResultBlock)
}
// All tools get the same rendering path — no MCP/built-in bifurcation
await addToolResult(toolOutput, mappedToolResultBlock)

const postToolHookInfos: StopHookInfo[] = []
const postToolHookStart = Date.now()
Expand Down Expand Up @@ -1537,10 +1535,6 @@ async function checkPermissionsAndCallTool(
)
}

if (isMcpTool(tool)) {
await addToolResult(toolOutput)
}

// Show PostToolUse hook timing inline below tool result when > 500ms.
// Use wall-clock time (not sum of individual durations) since hooks run in parallel.
if (process.env.USER_TYPE === 'ant' && postToolHookInfos.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/MCPTool/MCPTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const inputSchema = lazySchema(() => z.object({}).passthrough())
type InputSchema = ReturnType<typeof inputSchema>

export const outputSchema = lazySchema(() =>
z.string().describe('MCP tool execution result'),
z.any().describe('MCP tool execution result'),
)
type OutputSchema = ReturnType<typeof outputSchema>

Expand Down