[DOCS] PostToolUse docs still describe MCP-only `updatedMCPToolOutput` instead of all-tool `updatedToolOutput`

Resolved 💬 3 comments Opened Apr 28, 2026 by coygeek Closed May 18, 2026

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:

For PostToolUse hooks, you can set additionalContext to 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:

  1. In https://code.claude.com/docs/en/hooks, replace the MCP-only updatedMCPToolOutput entry with updatedToolOutput, and state that it can replace tool output for all tools.
  2. Add a short PostToolUse JSON example that rewrites the output of a non-MCP tool so the new scope is explicit.
  3. Update the Agent SDK hook reference pages and the TypeScript/Python type docs to expose updatedToolOutput.
  4. If updatedMCPToolOutput is 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)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗