Skip to content

Commit cf1e906

Browse files
authored
fix(aws-iac-mcp-server): renaming some read tool calls and suggestions in description to … (#1868)
* fix: renaming some read tool calls and suggestions in description to the tproper tool call read_iac_documentation_page * fix: renaming some read tool calls and suggestions in description to the tproper tool call read_iac_documentation_page
1 parent 574e4c9 commit cf1e906

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/aws-iac-mcp-server/awslabs/aws_iac_mcp_server/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ async def search_cdk_documentation(query: str) -> str:
317317
318318
Use rank to prioritize results. Check error field first - if not null, the search failed.
319319
320-
If a content snippet is relevant to your query but doesn't show all necessary information, use `read_cdk_documentation_page` with the URL to get the complete content.
320+
If a content snippet is relevant to your query but doesn't show all necessary information, use `read_iac_documentation_page` with the URL to get the complete content.
321321
322322
Args:
323323
query: Search query for CDK documentation (required)

src/aws-iac-mcp-server/awslabs/aws_iac_mcp_server/tools/iac_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from typing import Literal
1919

2020

21-
SEARCH_TOOL_NEXT_STEPS_GUIDANCE = 'To read the full documentation pages for these search results, use the `read_cdk_documentation_page` tool. If you need to find real code examples for constructs referenced in the search results, use the `search_cdk_samples_and_constructs` tool.'
21+
SEARCH_TOOL_NEXT_STEPS_GUIDANCE = 'To read the full documentation pages for these search results, use the `read_iac_documentation_page` tool. If you need to find real code examples for constructs referenced in the search results, use the `search_cdk_samples_and_constructs` tool.'
2222

2323
READ_TOOL_NEXT_STEPS_GUIDANCE = (
2424
'If you need code examples, use `search_cdk_samples_and_constructs` tool.'
@@ -27,7 +27,7 @@
2727
SEARCH_CDK_DOCUMENTATION_TOPIC = 'cdk_docs'
2828
SEARCH_CLOUDFORMATION_DOCUMENTATION_TOPIC = 'cloudformation'
2929
SEARCH_CDK_CONSTRUCTS_TOPIC = 'cdk_constructs'
30-
SAMPLE_CONSTRUCT_SEARCH_TOOL_NEXT_STEPS_GUIDANCE = 'To read the full documentation pages for these search results, use the `read_cdk_documentation_page` tool.'
30+
SAMPLE_CONSTRUCT_SEARCH_TOOL_NEXT_STEPS_GUIDANCE = 'To read the full documentation pages for these search results, use the `read_iac_documentation_page` tool.'
3131

3232
SupportedLanguages = Literal['typescript', 'python', 'java', 'csharp', 'go']
3333

src/aws-iac-mcp-server/tests/test_server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ async def test_search_cdk_documentation_success(self, mock_sanitize, mock_search
201201
"""Test successful CDK documentation search."""
202202
mock_response = CDKToolResponse(
203203
knowledge_response=[],
204-
next_step_guidance='To read the full documentation pages for these search results, use the `read_cdk_documentation_page` tool. If you need to find real code examples for constructs referenced in the search results, use the `search_cdk_samples_and_constructs` tool.',
204+
next_step_guidance='To read the full documentation pages for these search results, use the `read_iac_documentation_page` tool. If you need to find real code examples for constructs referenced in the search results, use the `search_cdk_samples_and_constructs` tool.',
205205
)
206206
mock_search.return_value = mock_response
207207
mock_sanitize.return_value = 'sanitized response'
@@ -213,8 +213,8 @@ async def test_search_cdk_documentation_success(self, mock_sanitize, mock_search
213213
mock_sanitize.assert_called_once()
214214

215215

216-
class TestReadCdkDocumentationPage:
217-
"""Test read_cdk_documentation_page tool."""
216+
class TestReadIaCDocumentationPage:
217+
"""Test read_iac_documentation_page tool."""
218218

219219
@patch('awslabs.aws_iac_mcp_server.server.read_iac_documentation_page_tool')
220220
@patch('awslabs.aws_iac_mcp_server.server.sanitize_tool_response')
@@ -280,7 +280,7 @@ async def test_search_cdk_samples_and_constructs_success(self, mock_sanitize, mo
280280
"""Test successful CDK samples and constructs search."""
281281
mock_response = CDKToolResponse(
282282
knowledge_response=[],
283-
next_step_guidance='To read the full documentation pages for these search results, use the `read_cdk_documentation_page` tool.',
283+
next_step_guidance='To read the full documentation pages for these search results, use the `read_iac_documentation_page` tool.',
284284
)
285285
mock_search.return_value = mock_response
286286
mock_sanitize.return_value = 'sanitized response'
@@ -300,7 +300,7 @@ async def test_search_cdk_samples_and_constructs_with_language(
300300
"""Test CDK samples search with specific language."""
301301
mock_response = CDKToolResponse(
302302
knowledge_response=[],
303-
next_step_guidance='To read the full documentation pages for these search results, use the `read_cdk_documentation_page` tool.',
303+
next_step_guidance='To read the full documentation pages for these search results, use the `read_iac_documentation_page` tool.',
304304
)
305305
mock_search.return_value = mock_response
306306
mock_sanitize.return_value = 'sanitized response'

src/aws-iac-mcp-server/tests/tools/test_read_cdk_documentation_page_tool.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
from unittest.mock import AsyncMock, patch
2121

2222

23-
class TestReadCDKDocumentationPage:
24-
"""Test read_cdk_documentation_page_tool function."""
23+
class TestReadIaCDocumentationPage:
24+
"""Test read_iac_documentation_page_tool function."""
2525

2626
@pytest.mark.asyncio
27-
async def test_read_cdk_documentation_page_success(self):
27+
async def test_read_iac_documentation_page_success(self):
2828
"""Test successful CDK documentation page read."""
2929
mock_response = [
3030
KnowledgeResult(
@@ -52,7 +52,7 @@ async def test_read_cdk_documentation_page_success(self):
5252
)
5353

5454
@pytest.mark.asyncio
55-
async def test_read_cdk_documentation_page_with_start_index(self):
55+
async def test_read_iac_documentation_page_with_start_index(self):
5656
"""Test CDK documentation page read with start index."""
5757
with patch(
5858
'awslabs.aws_iac_mcp_server.tools.iac_tools.read_documentation',
@@ -69,7 +69,7 @@ async def test_read_cdk_documentation_page_with_start_index(self):
6969
)
7070

7171
@pytest.mark.asyncio
72-
async def test_read_cdk_documentation_page_error(self):
72+
async def test_read_iac_documentation_page_error(self):
7373
"""Test CDK documentation page read with error handling."""
7474
with patch(
7575
'awslabs.aws_iac_mcp_server.tools.iac_tools.read_documentation',

0 commit comments

Comments
 (0)