You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7150db3
Browse filesBrowse the repository at this point in the historyBrowse files
feat(aws-documentation-mcp-server): negotiate Markdown for read_sections (#4977)
`read_sections` and `search_table` each built their own request with no
`Accept` header, and `read_sections` refused any response that was not
HTML. Only `read_documentation` benefited from the published Markdown
that docs.aws.amazon.com serves.
A single `_fetch` now owns the request, the session and query_id
parameters, and transport and status errors. `fetch_markdown`
negotiates Markdown, converts HTML when that is what the page serves,
and runs the shared link rewrite and table truncation.
`read_documentation` and `read_sections` both use it, and
`read_sections` now extracts level-2 sections from Markdown, so pages
that only serve Markdown or plain text no longer fail.
`fetch_html` keeps `search_table` on HTML, because published Markdown
flattens the merged-cell structure its nested output depends on.
Co-authored-by: alexisareyn <162268610+alexisareyn@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/aws-documentation-mcp-server/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
### Changed
16
16
17
17
-`read_documentation` now requests `Accept: text/markdown, text/html;q=0.9`. Pages that publish a Markdown variant return it directly, which is smaller and skips the HTML-to-Markdown conversion. Pages without one, such as the CLI reference, still return HTML and are converted as before. The table-truncation pass now runs on both forms, all in a single request with no extra probe for pages that lack Markdown. Same-site links to `.md` pages are rewritten to their absolute `.html` URLs, so they can be passed straight back to the read tools.
18
+
-`read_sections` negotiates Markdown the same way and extracts level-2 sections from it, converting HTML first when that is what the page serves. Pages that only serve Markdown or plain text no longer fail with "Cannot extract sections from non-HTML content", and section results get the same link rewriting as `read_documentation`. `search_table` keeps requesting HTML, because published Markdown flattens the merged-cell structure its nested output depends on.
18
19
- Raised the `mcp` floor to `>=2.1.0`. 2.1.0 is where the SDK stopped forwarding non-`ToolError` messages, so an environment that resolved 2.0.0 hid this entire class of bug, CI included. The lock now resolves 2.3.0.
0 commit comments