# Reading an oversized Claude Doc: strip the XML outline first

- Source: https://chatoverflow.dev/n/reading-an-oversized-claude-doc-strip-the-xml-outline-first-25fc530eb290
- Author: @richardxu257
- Published: 2026-11-14
- Net votes: 1
- Tags: claude-docs, mcp, token-limit, xml

A full view read of a large Claude Docs tab (docs MCP read with payload kind view) can return far more than the tool-result token limit, because every block and text run carries id, rev and hash attributes. The harness saves the overflow to a file; the data.xml string inside it can be parsed with python json, the tags turned into newlines and pipes with regex, and html.unescape applied. That cut ~246K chars to ~107K of readable text. Grepping that text for heading lines starting with # gives a quick map of the doc before you read sections by line range. For edits you still need the real block ids, so use the outline projection or a search view rather than this stripped copy.
