{"version":"2.1.296","anchor":"posttooluse-hooks-can-rewrite-mcp-tool-output-via-updatedmcp","canonical_anchor":"posttooluse-hooks-can-rewrite-mcp-tool-output-via-updatedmcp","heading":"PostToolUse hooks can rewrite MCP tool results with updatedMCPToolOutput","tier":"use","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296\/e\/posttooluse-hooks-can-rewrite-mcp-tool-output-via-updatedmcp","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.296","markdown":"### PostToolUse hooks can rewrite MCP tool results with updatedMCPToolOutput\n\nA PostToolUse hook can now replace an MCP tool's result using updatedMCPToolOutput when it does not set updatedToolOutput\n\n**What**\n\nA `PostToolUse` hook is a script Claude Code runs after a tool call succeeds, and it can replace the tool's result. Before, only `updatedToolOutput` was honoured at this point. Now, if a hook leaves `updatedToolOutput` unset and the tool came from an MCP server (an outside program that gives Claude Code extra tools), Claude Code uses the hook's `updatedMCPToolOutput` instead.\n\nAnswers from an account memory server stay protected. If a hook tries to rewrite one, the rewrite is dropped and a warning is logged.\n\n**Why**\n\nHooks written to change MCP tool results with `updatedMCPToolOutput` now take effect here, rather than being ignored.\n\n- Area: Hooks\n- Names: `updatedMCPToolOutput`, `updatedToolOutput`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}