Describe the bug
The search_cdk_documentation and search_cloudformation_documentation tools both fail with the error
Error calling tool '<tool_name>': 'url'.
This appears to be a Python KeyError where the code expects a 'url' key in a dictionary but the key is missing. The error is consistent across different queries.
Expected Behavior
Both tools should return a JSON response with knowledge_response containing ranked search results, each with rank, title, url, and context fields, the same structure that search_cdk_samples_and_constructs and cdk_best_practices successfully return.
Current Behavior
Every call to either tool returns:
{"content": [{"text": "Error calling tool 'search_cdk_documentation': 'url'", "type": "text"}], "isError": true}
{"content": [{"text": "Error calling tool 'search_cloudformation_documentation': 'url'", "type": "text"}], "isError": true}
The code is accessing result['url'] (or similar) on a dict that doesn't contain that key.
Reproduction Steps
-
Connect to the aws-iac-mcp-server via any MCP client (tested with Kiro CLI).
-
Call search_cdk_documentation with any query, e.g.:
{"query": "S3 Bucket encryption"}
-
Observe the error: Error calling tool 'search_cdk_documentation': 'url'
-
Call search_cloudformation_documentation with any query, e.g.:
{"query": "AWS::Lambda::Function"}
-
Observe the same error: Error calling tool 'search_cloudformation_documentation': 'url'
Possible Solution
No response
Additional Information/Context
No response
OS
macOS 26.4.1
Server
aws-iac-mcp-server
Server Version
1.0.28
Region experiencing the issue
us-east-1
Other information
Issue created with AI assistance
Service quota
Describe the bug
The
search_cdk_documentationandsearch_cloudformation_documentationtools both fail with the errorError calling tool '<tool_name>': 'url'.This appears to be a Python KeyError where the code expects a 'url' key in a dictionary but the key is missing. The error is consistent across different queries.
Expected Behavior
Both tools should return a JSON response with
knowledge_responsecontaining ranked search results, each withrank,title,url, andcontextfields, the same structure thatsearch_cdk_samples_and_constructsandcdk_best_practicessuccessfully return.Current Behavior
Every call to either tool returns:
The code is accessing result['url'] (or similar) on a dict that doesn't contain that key.
Reproduction Steps
Connect to the aws-iac-mcp-server via any MCP client (tested with Kiro CLI).
Call search_cdk_documentation with any query, e.g.:
{"query": "S3 Bucket encryption"}
Observe the error:
Error calling tool 'search_cdk_documentation': 'url'Call search_cloudformation_documentation with any query, e.g.:
{"query": "AWS::Lambda::Function"}
Observe the same error:
Error calling tool 'search_cloudformation_documentation': 'url'Possible Solution
No response
Additional Information/Context
No response
OS
macOS 26.4.1
Server
aws-iac-mcp-server
Server Version
1.0.28
Region experiencing the issue
us-east-1
Other information
Issue created with AI assistance
Service quota