[DOCS] PostToolUse docs still describe MCP-only `updatedMCPToolOutput` instead of all-tool `updatedToolOutput`
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/hooks
Section/Topic
PostToolUse decision control, plus the Agent SDK hook output type/reference pages for PostToolUse hook responses.
Current Documentation
The docs currently say:
| updatedMCPToolOutput | For [MCP tools](#match-mcp-tools) only: replaces the tool's output with the provided value |
And the Agent SDK references still expose the old MCP-only field:
ForPostToolUsehooks, you can setadditionalContextto append information to the tool result.
``ts { hookEventName: "PostToolUse"; additionalContext?: string; updatedMCPToolOutput?: unknown; } ``
In the v2.1.121 changelog, Claude Code now says:
PostToolUse hooks can now replace tool output for all tools via hookSpecificOutput.updatedToolOutput (previously MCP-only)
What's Wrong or Missing?
The hooks reference and Agent SDK docs still document the pre-v2.1.121 behavior.
They describe PostToolUse output replacement as MCP-only and name the field updatedMCPToolOutput, but the changelog says this capability now works for all tools via hookSpecificOutput.updatedToolOutput.
That leaves the current docs contradictory in two ways:
A. The documented field name is outdated
Users looking up PostToolUse output replacement see updatedMCPToolOutput, not updatedToolOutput.
B. The documented scope is outdated
The reference says output replacement is only for MCP tools, but v2.1.121 expands it to all tools.
C. SDK type/reference pages still reflect the old behavior
The TypeScript and Python Agent SDK references still expose updatedMCPToolOutput and omit updatedToolOutput, so SDK users do not have accurate current guidance.
Suggested Improvement
Update the PostToolUse documentation to match v2.1.121:
- In
https://code.claude.com/docs/en/hooks, replace the MCP-onlyupdatedMCPToolOutputentry withupdatedToolOutput, and state that it can replace tool output for all tools. - Add a short
PostToolUseJSON example that rewrites the output of a non-MCP tool so the new scope is explicit. - Update the Agent SDK hook reference pages and the TypeScript/Python type docs to expose
updatedToolOutput. - If
updatedMCPToolOutputis still accepted for backward compatibility, document that explicitly as a deprecated alias; otherwise remove it from the reference/types.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/hooks | 1274-1279 | PostToolUse decision-control table still documents updatedMCPToolOutput as MCP-only |
| https://code.claude.com/docs/en/agent-sdk/hooks | 236-239 | Agent SDK hook output overview says PostToolUse can append additionalContext, but does not mention output replacement for all tools |
| https://code.claude.com/docs/en/agent-sdk/typescript | 1376-1379 | PostToolUse type still exposes updatedMCPToolOutput?: unknown |
| https://code.claude.com/docs/en/agent-sdk/python | 2135-2138 | PostToolUseHookSpecificOutput still exposes updatedMCPToolOutput |
| https://platform.claude.com/docs/en/agent-sdk/hooks | 234-235 | Platform Agent SDK hook output overview has the same omission |
| https://platform.claude.com/docs/en/agent-sdk/typescript | 1238-1240 | Platform TypeScript SDK reference still exposes updatedMCPToolOutput?: unknown |
| https://platform.claude.com/docs/en/agent-sdk/python | 2076-2079 | Platform Python SDK reference still exposes updatedMCPToolOutput |
Total scope: 7 pages affected
Source: Changelog v2.1.121
Exact changelog entry: PostToolUse hooks can now replace tool output for all tools via hookSpecificOutput.updatedToolOutput (previously MCP-only)
3 Comments
A note before this docs change lands: empirically on 2.1.121, the docs are accidentally still correct for MCP.
updatedToolOutputis silently dropped for MCP tools, while the legacyupdatedMCPToolOutputis the only field that's honored.Evidence in #54196 comment — counter-driven probe against
mcp__adobe-wiki__search_wiki_content, four shapes tested for the new field (including the exact nativetool_responseshape) all dropped; legacy field with content-block-array shape works.So updating the docs to point at
updatedToolOutputfor MCP looks like it should wait until the harness actually honors that field for MCP. The agent-sdk-typescript@0.2.121 changelog claim that "updatedMCPToolOutputis deprecated" is also premature for the same reason.Issue #54161 Verification
Title: [DOCS] PostToolUse docs still describe MCP-only
updatedMCPToolOutputinstead of all-toolupdatedToolOutputIssue Date: 2026-04-28
Verification Date: 2026-05-18
Status: RESOLVED
---
Issue Summary
This issue reports that the
PostToolUsedocumentation and Agent SDK references still described tool-output replacement as MCP-only viaupdatedMCPToolOutput, even though the changelog said the current field should beupdatedToolOutputfor all tools.---
Verification Results
Claim 1: The main hooks reference should document
updatedToolOutputfor all tools instead of only MCP toolsStatus: RESOLVED
At https://code.claude.com/docs/en/hooks, lines 1477-1481, the
PostToolUse decision controltable now saysdecisioncan useupdatedToolOutput, definesupdatedToolOutputas replacing the tool output before Claude sees it, and keepsupdatedMCPToolOutputonly as an MCP-specific legacy field: "PreferupdatedToolOutput, which works for all tools".Verdict: The primary Claude Code hooks reference now documents the all-tools field and no longer presents MCP-only replacement as the only current behavior.
---
Claim 2: The Agent SDK hooks overview should mention that
PostToolUsecan replace tool output, not just appendadditionalContextStatus: RESOLVED
At https://code.claude.com/docs/en/agent-sdk/hooks, lines 238-241, the
Outputssection now says: "ForPostToolUsehooks, you can setadditionalContextto append information to the tool result, orupdatedToolOutputto replace the tool's output entirely before Claude sees it."At https://platform.claude.com/docs/en/agent-sdk/hooks, line 1381, the live page now says the same thing:
PostToolUsehooks can useupdatedToolOutputto replace the tool's output before Claude sees it.Verdict: Both current SDK hooks overview pages now describe output replacement with
updatedToolOutputrather than omitting it.---
Claim 3: The TypeScript and Python Agent SDK references should expose
updatedToolOutputinstead of onlyupdatedMCPToolOutputStatus: RESOLVED
At https://code.claude.com/docs/en/agent-sdk/typescript, lines 1537-1541, the
PostToolUseoutput type now includesupdatedToolOutput?: unknown;and marksupdatedMCPToolOutput?: unknown;as deprecated: "UseupdatedToolOutput, which works for all tools."At https://code.claude.com/docs/en/agent-sdk/python, lines 2197-2201,
PostToolUseHookSpecificOutputnow includesupdatedToolOutput: NotRequired[Any]and keepsupdatedMCPToolOutputonly as a deprecated alias.At https://platform.claude.com/docs/en/agent-sdk/typescript, lines 2252-2256 on the current live page, the
PostToolUseoutput type includesupdatedToolOutput?: unknown;and marksupdatedMCPToolOutput?: unknown;as deprecated.At https://platform.claude.com/docs/en/agent-sdk/python, lines 2630-2634 on the current live page,
PostToolUseHookSpecificOutputincludesupdatedToolOutput: NotRequired[Any]and keepsupdatedMCPToolOutputonly as a deprecated alias.Verdict: The current live TypeScript and Python SDK references on both domains now expose
updatedToolOutputand treatupdatedMCPToolOutputas deprecated compatibility guidance rather than the only documented field.---
Current State
| Claim | Status |
|-------|--------|
| Main hooks reference documents all-tool
updatedToolOutput| RESOLVED || SDK hooks overview documents output replacement with
updatedToolOutput| RESOLVED || TypeScript and Python SDK type references expose
updatedToolOutputand deprecateupdatedMCPToolOutput| RESOLVED |---
Suggested Fix
N/A - issue has been resolved.
---
References
updatedToolOutputfor replacing tool output and saysupdatedMCPToolOutputis legacy for MCP tools, preferringupdatedToolOutputfor all tools.PostToolUsehooks can appendadditionalContextor useupdatedToolOutputto replace the tool output entirely before Claude sees it.PostToolUsehooks can useupdatedToolOutputto replace the tool output before Claude sees it.updatedToolOutput?: unknown;and marksupdatedMCPToolOutputas deprecated.updatedToolOutput: NotRequired[Any]and keepsupdatedMCPToolOutputonly as a deprecated alias.updatedToolOutput?: unknown;and deprecatesupdatedMCPToolOutput.updatedToolOutput: NotRequired[Any]and deprecatesupdatedMCPToolOutput.---
Conclusion & Recommendation
Primary Concern: The issue reported that the public docs still presented
PostToolUseoutput replacement as MCP-only and used the outdated field nameupdatedMCPToolOutputas the primary guidance.Resolution Status: RESOLVED
Recommendation: CLOSE
The current live docs now document
updatedToolOutputin the primary hooks reference, explain it in the SDK hooks overview, and expose it in the TypeScript and Python SDK references on both documentation domains. The remaining mentions ofupdatedMCPToolOutputare now documented as deprecated compatibility aliases rather than current primary guidance.---
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.