Repository navigation
Conversation
…able's title names parse_html_tables kept only the last heading that matched section_title, so on a page that repeats a title search_table read the wrong section. On the Lambda quotas page, "Compute and storage" heads both the function quotas (h2) and the Lambda MicroVMs quotas (h3); the tool searched only the MicroVMs table and a query for "Concurrent executions" found nothing. Collect the tables of every matching section, in page order, the same way read_sections returns every section that carries a title. A table under a matching heading nested inside another matching section is counted once.
burrows99
requested review from
a team,
AadityaBhoota,
JonLim,
alexisareyn,
artb30,
kstich,
mc5672,
riaagnes and
zjerath
as code owners
November 22, 2026 18:26
…ated-section-titles # Conflicts: # src/aws-documentation-mcp-server/CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Summary
Changes
search_tableread only the last heading that matchedsection_title. On a page that repeats a title, it searched the wrong section and missed rows.The Lambda quotas page (
gettingstarted-limits.html) uses "Compute and storage" twice: once as anh2for function quotas and once as anh3under Lambda MicroVMs. Withsection_title="Compute and storage", the tool searched only the MicroVMs table. A query for "Concurrent executions", the most-asked Lambda quota, matched nothing.parse_html_tablesnow collects the tables of every section whose heading matches, in page order. This matches howread_sectionsalready returns every section with a given title.h2 Quotas>h3 Quotas). Its tables are counted once, and they keep theirtable_heading.flowchart TD A[search_table with Compute and storage] --> B{Two headings match} B -->|Before| C[Only the last section is searched] B -->|After| D[Both sections are searched in page order]User experience
Narrated recording, before then after (sound on):
search-table-evidence.mp4
The recording uses a saved copy of the Lambda quotas page and the same two calls
search_tablemakes:Before (main):
After:
Edge cases and unchanged behaviour checked (in the recording, on the branch, against the saved page or inline HTML):
'compute AND storage'gives both tables.h2 Quotas(table a) >h3 Quotas(table b) gives[[{'Name': 'a'}], [{'Name': 'b'}]]. On main this returned onlyb.'Lambda API requests') still gives one flat table (['Resource', 'Quota'], 6 rows).Section "Nonexistent" not found. With no title, all 13 tables on the page are still searched.Tests (in
src/aws-documentation-mcp-server):test_repeated_section_title_searches_every_sectionandtest_repeated_title_nested_in_matching_section_counts_tables_oncetotests/test_table_utils.py. Both fail on main (KeyError: 'tables', because only one section's single table comes back) and pass with the fix.pytest tests -m "not live" --ignore=tests/test_integ_basic.py: 512 passed, 30 deselected.test_integ_basic.pyimports the repo-leveltestingpackage, which my sparse checkout did not include, so it was not run. Live tests were not run.ruff format --check,ruff checkandpyrighton the changed module: clean.AI assistance (Claude Code) was used to write this change and its description.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (Y/N) N
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.
🤖 Generated with Claude Code