#15530: docs(web_fetch): document markdown-first Accept header and cf-markdown extraction
docs
stale
size: XS
Docs follow-up for recent web_fetch markdown handling changes.
This updates docs to clarify:
- web_fetch sends markdown-first Accept header:
`text/markdown, text/html;q=0.9, */*;q=0.1`
- text/markdown responses use the `cf-markdown` extraction path
Updated files:
- docs/tools/web.md
- docs/tools/index.md
No code changes; documentation-only PR.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR is a documentation-only follow-up clarifying `web_fetch`’s markdown-first `Accept` header (`text/markdown, text/html;q=0.9, */*;q=0.1`) and that `text/markdown` responses use the `cf-markdown` extraction path.
The docs match the implementation in `src/agents/tools/web-fetch.ts` for the `Accept` header and `text/markdown` handling. One note in `docs/tools/web.md` overstates when `web_fetch` errors: for other content types the tool can return the raw body (`extractor: "raw"`) rather than failing extraction.
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge after a small docs precision fix.
- Changes are documentation-only and align with the current `web_fetch` implementation for the markdown-first Accept header and `cf-markdown` extractor. The only issue found is a slightly misleading error-condition sentence in the web_fetch notes section.
- docs/tools/web.md
<sub>Last reviewed commit: 7339d66</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#15251: feat(web-fetch): send Accept: text/markdown header for Cloudflare M...
by wujieli0207 · 2026-02-13
86.4%
#15414: feat(web-fetch): add Accept: text/markdown header for Cloudflare Ma...
by aldoeliacim · 2026-02-13
83.6%
#16590: fix(web-fetch): use bot UA for markdown to enable Cloudflare LLM co...
by Imccccc · 2026-02-14
79.1%
#23762: docs: fix markdown formatting and structure issues
by jainilDesai · 2026-02-22
78.1%
#20423: fix(web-fetch): cap htmlToMarkdown input size to prevent catastroph...
by Limitless2023 · 2026-02-18
77.3%
#7210: docs: cleanup citation artifacts and update twitter URLs to X
by hongxuWei · 2026-02-02
76.1%
#7252: docs: align config examples and tool docs with current runtime
by nice-and-precise · 2026-02-02
75.1%
#6751: docs(browser): update JSON configuration format in documentation
by saltapp · 2026-02-02
75.1%
#16362: Update session-pruning.md - updated agents.defaults config std
by elliottb · 2026-02-14
74.6%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
74.0%