fix(aws-documentation-mcp-server): add Kiro IDE/CLI URL support and fix contradictory docstrings#2729
Open
emergingsana123 wants to merge 3 commits intoawslabs:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves aws-documentation-mcp-server handling of Kiro IDE/CLI documentation by expanding read_documentation URL validation to accept kiro.dev/docs/... URLs and by clarifying tool docstrings/README scope so users understand when to use read_documentation vs search_documentation.
Changes:
- Extend
read_documentationURL validation to accept Kiro docs URLs (and update docstrings to list supported domains). - Update
search_documentationdocstring + server README to document that search is limited to AWS docs and provide Kiro URL workarounds. - Add/adjust tests for Kiro URL support and docstring expectations.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/aws-documentation-mcp-server/awslabs/aws_documentation_mcp_server/server_aws.py | Expands supported URL validation to include kiro.dev/docs/ and updates tool docstrings. |
| src/aws-documentation-mcp-server/awslabs/aws_documentation_mcp_server/server_aws_cn.py | Mirrors domain support/docstring updates for the China server’s read_documentation. |
| src/aws-documentation-mcp-server/README.md | Documents scope (what can be searched vs directly read) and provides Kiro usage examples. |
| src/aws-documentation-mcp-server/tests/test_server_aws.py | Updates validation expectations and adds live/docstring tests for Kiro guidance. |
| src/aws-documentation-mcp-server/tests/test_server_aws_cn.py | Updates assertions to match the updated validation error messaging. |
| src/aws-documentation-mcp-server/tests/test_edge_cases_kiro.py | Adds comprehensive Kiro/URL-validation edge case tests and docstring structure assertions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/aws-documentation-mcp-server/awslabs/aws_documentation_mcp_server/server_aws_cn.py
Outdated
Show resolved
Hide resolved
src/aws-documentation-mcp-server/awslabs/aws_documentation_mcp_server/server_aws.py
Show resolved
Hide resolved
… naming, and requires_uv markers
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.
Summary
When users queried
aws-documentation-mcp-serverfor Kiro IDE/CLI topics(e.g. "Kiro CLI custom agents"), the server returned empty results with no
guidance. Three root causes were identified and fixed:
kiro.devURLs were rejected by URL validation — Kiro docs use trailing-slashURLs (
/docs/cli/custom-agents/creating/) but the regex required.htmlendingsread_documentationdocstring contradicted itself — claimed to support any URLbut also stated "must be docs.aws.amazon.com"
search_documentationgave no warning that it cannot search Kiro docs,leaving users with a silent empty result and no fallback guidance
Changes
server_aws.pykiro.dev/docs/trailing-slash URLskirofromSEARCH_TERM_DOMAIN_MODIFIERS— AWS search API does notindex
kiro.dev, modifier produced empty results and contradicted docstringread_documentationdocstring: lists all supported domains (AWS, Kiro, Neuron),removes contradictory domain restriction
search_documentationdocstring: added scope warning with Kiro URLs to usewith
read_documentationinsteadserver_aws_cn.pyREADME.mdread_documentation, not justdocs.aws.amazon.comtests/test_server_aws.pytest_read_documentation_works_for_kiro_url(live)test_search_documentation_docstring_mentions_kiro@pytest.mark.asyncioto Kiro live test (was failing with--run-live)tests/test_server_aws_cn.pytests/test_edge_cases_kiro.pyassert ... or Truewith real module-level function assertiontests/conftest.pyrequires_uvmarker using existingpytest_collection_modifyitemspattern (same approach as
--run-livetests)tests/test_integ_basic.py@pytest.mark.requires_uvto 3 integration tests that requireuvTest Results
tests/test_server_aws.py,test_server_aws_cn.py,test_edge_cases_kiro.pytest_server_aws.py::test_read_documentation_works_for_kiro_url --run-livepython -m pytest --cov --cov-branch --cov-report=term-missingNote on 3 failing tests
tests/test_integ_basic.pycontains 3 infrastructure integration tests thatlaunch the server subprocess via
uv. These fail in CI environments whereuvis not on
PATH— this is an environmental constraint, not a product regression.They are unrelated to any Kiro code changes in this PR. A
@pytest.mark.requires_uvguard was added so they skip gracefully instead of failing when
uvis unavailable.Backward Compatibility
No breaking changes. All existing AWS URL patterns, tool signatures, and
search behavior are unchanged. Kiro support is purely additive.
fixes #2680
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.