Skip to content

feat: replace cost-analysis with aws-pricing MCP Server #758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jul 9, 2025

Conversation

nspring00
Copy link
Contributor

@nspring00 nspring00 commented Jul 8, 2025

Fixes

Summary

Changes

This PR is Part 1 of a 2-part series that renames and refactors the cost-analysis-mcp-server to aws-pricing-mcp-server, streamlining the pricing functionality and improving the overall user experience. This change is done analogous to PR #447 which renamed lambda-tool-mcp-server. Part 2 will add new tools and improvements to the get_pricing tool to make retrieving pricing details easier and more comprehensive.

The major changes in this PR include:

  • Package Rename: Renamed cost-analysis-mcp-server to aws-pricing-mcp-server to better reflect its core functionality
  • API Simplification: Consolidated pricing tools by:
    • Renaming get_pricing_from_api to get_pricing
    • Removing get_pricing_from_web functionality to focus on reliable API-based pricing
  • Documentation Updates: Updated all references, imports, and documentation to reflect the new naming
  • GitHub Configuration: Updated CODEOWNERS and issue templates to use correct references

User experience

Before:

  • Users had two pricing tools (get_pricing_from_api and get_pricing_from_web) which could be confusing
  • Package name cost-analysis-mcp-server was less descriptive of the (new/upcoming) core pricing functionality
  • Web scraping approach was less reliable and accurate

After:

  • Single, clear get_pricing tool that uses reliable AWS Pricing API
  • Package name aws-pricing-mcp-server clearly indicates AWS pricing focus
  • More reliable and consistent pricing data from official AWS APIs
  • Cleaner, more maintainable codebase focused on core functionality

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? Y

RFC issue number: #562 (this is part 1, part 2 will add new functionality)

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

nspring00 and others added 9 commits June 27, 2025 17:07
# Conflicts:
#	src/aws-pricing-mcp-server/awslabs/aws_pricing_mcp_server/models.py
#	src/aws-pricing-mcp-server/awslabs/aws_pricing_mcp_server/server.py
#	src/aws-pricing-mcp-server/pyproject.toml
#	src/aws-pricing-mcp-server/tests/test_server.py
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link
Contributor

@aytech-in aytech-in left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nspring00 nspring00 marked this pull request as ready for review July 8, 2025 15:15
@nspring00 nspring00 requested review from a team and PaulVincent707 as code owners July 8, 2025 15:15
@nspring00 nspring00 requested a review from dineshSajwan July 8, 2025 17:59
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.60%. Comparing base (0712010) to head (7daec39).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
+ Coverage   85.39%   88.60%   +3.20%     
==========================================
  Files          96      387     +291     
  Lines        8657    28828   +20171     
  Branches     1228     4491    +3263     
==========================================
+ Hits         7393    25543   +18150     
- Misses        864     2110    +1246     
- Partials      400     1175     +775     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

theagenticguy
theagenticguy previously approved these changes Jul 8, 2025
@theagenticguy theagenticguy added the hold-merging Signals to hold the PR from merging label Jul 8, 2025
@theagenticguy theagenticguy removed the hold-merging Signals to hold the PR from merging label Jul 8, 2025
dineshSajwan
dineshSajwan previously approved these changes Jul 9, 2025
@nspring00
Copy link
Contributor Author

As requested by @dineshSajwan , I cut another PR to add deprecation warnings to the cost-analysis-mcp-server: #772

Copy link
Member

@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add deprecation warnings to cost-analysis-mcp-server

@scottschreckengaust
Copy link
Member

Please add deprecation warnings to cost-analysis-mcp-server

Here is a potential diff:

--- a/src/cost-analysis-mcp-server/awslabs/cost_analysis_mcp_server/server.py
+++ b/src/cost-analysis-mcp-server/awslabs/cost_analysis_mcp_server/server.py
@@ -19,6 +19,7 @@ This server provides tools for analyzing AWS service costs across different user
 
 import os
 import sys
+import warnings
 from awslabs.cost_analysis_mcp_server import consts
 from awslabs.cost_analysis_mcp_server.cdk_analyzer import analyze_cdk_project
 from awslabs.cost_analysis_mcp_server.models import ErrorResponse, PricingFilters
@@ -741,6 +742,9 @@ async def generate_cost_report_wrapper(
 
 def main():
     """Run the MCP server with CLI argument support."""
+    warnings.filterwarnings('error', category=DeprecationWarning)
+    warnings.warn('Please use `awslabs.aws-pricing-mcp-server` instead.',
+                  DeprecationWarning)
     mcp.run()

@scottschreckengaust scottschreckengaust changed the title feat: Rename cost-analysis to aws-pricing MCP Server feat: replace cost-analysis with aws-pricing MCP Server Jul 9, 2025
nspring00 added 3 commits July 9, 2025 21:38
# Conflicts:
#	README.md
#	docs/index.md
#	src/aws-pricing-mcp-server/README.md
#	src/aws-pricing-mcp-server/awslabs/aws_pricing_mcp_server/server.py
#	src/aws-pricing-mcp-server/tests/test_server.py
@nspring00 nspring00 dismissed stale reviews from dineshSajwan and theagenticguy via bd50501 July 9, 2025 19:45
dineshSajwan
dineshSajwan previously approved these changes Jul 9, 2025
Copy link
Contributor

@dineshSajwan dineshSajwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there hasn't been a release to push to cost-analysis so moving the files won't publish

# Conflicts:
#	src/aws-pricing-mcp-server/pyproject.toml
Copy link
Member

@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scottschreckengaust scottschreckengaust merged commit fceca0a into awslabs:main Jul 9, 2025
114 checks passed
rshevchuk-git added a commit to rshevchuk-git/mcp that referenced this pull request Jul 11, 2025
* docs: Add AI Development clients and enhance documentation/version co… (awslabs#717)

* docs: Add AI Development clients and enhance documentation/version control parts

* fix: formatting, url

* Update VIBE_CODING_TIPS_TRICKS.md

* fix: precommit trailing whitespaces

---------

Co-authored-by: Alain Krok <alkrok@amazon.com>

* feat: Adds an AWS HealthOmics MCP server (awslabs#598)

* feat: initial generation of the server

* feat: Adds intitial design docs

* initial implementations

* feat/ adds supported regions tool and clarifies types

* feat: use MCP style error handling

* feat: improved exception handling

* update current progress

* feat: remove generate_parameter_template tool from helper tools

- Remove generate_parameter_template function from helper_tools.py
- Remove tool registration from server.py
- Remove extract_wdl_inputs and related functions from wdl_utils.py
- Update server instructions to remove GenerateParameterTemplate reference
- Update design document to remove generate_parameter_template section
- Clean up unused imports in wdl_utils.py

This simplifies the helper tools by removing parameter template generation
functionality while keeping workflow validation and packaging tools.

* fix: adjusts model to more closely reflect HealthOmics model

* refactor: seperate log access into different tools

* refactor: adds startFromHead capability to log retrieval tools and uses this in diagnose_run_failure

* test(healthomics): add comprehensive unit tests for log functions

- Add unit tests for get_run_logs, get_run_manifest_logs, get_run_engine_logs, and get_task_logs
- Add unit tests for diagnose_run_failure function
- Refactor diagnose_run_failure to use centralized log functions from workflow_analysis
- Add start_from_head parameter to all log functions with default True
- Update diagnose_run_failure to use start_from_head=False for recent logs
- Fix UTC timezone handling in log timestamp conversion
- Improve error handling with specific ClientError and BotoCoreError handling
- Add comprehensive test fixtures and mocking in conftest.py
- Update test_server.py to properly verify all registered tools
- Update server instructions to document all available tools
- Achieve 89% test coverage for troubleshooting module
- All 33 unit tests passing with proper parameter validation and error scenarios

* docs(healthomics): update design document to reflect current implementation

- Update architecture and directory structure
- Document all 19 implemented tools
- Add recent log function improvements
- Include current test coverage metrics
- Add implementation details for error handling
- Update security considerations and future enhancements

* test(healthomics): add unit tests for get_supported_regions

- Add test cases for successful SSM region retrieval
- Test fallback to hardcoded regions when SSM is empty
- Add error handling tests for BotoCoreError and ClientError
- Test unexpected error handling and context error reporting
- Verify region list sorting and response structure

* test(healthomics): add unit tests for package_workflow tool

- Add comprehensive test suite for package_workflow functionality
- Cover basic workflow packaging, additional files, and error cases
- Test special characters and large file handling
- Ensure proper ZIP structure and content validation
- Verify error handling and context reporting

* test(healthomics): add comprehensive unit tests for workflow execution tools

- Add tests for get_run tool covering success, minimal response, and error cases
- Add tests for list_runs tool with filtering, pagination, and error handling
- Test various AWS error scenarios (BotoCoreError, ClientError, unexpected errors)
- Verify proper timestamp handling including None values
- Test parameter validation and edge cases
- Ensure proper error reporting through MCP context

* fix(healthomics): improve error handling and timestamp processing in workflow execution

- Add specific ClientError handling for better error reporting
- Improve timestamp field handling to check for None values
- Refactor field handling for better maintainability
- Fix potential AttributeError when calling isoformat() on None values

* test(healthomics): add comprehensive unit tests for workflow management tools

- Add tests for list_workflows tool covering success, empty response, and pagination
- Add tests for get_workflow tool with and without export type
- Test various AWS error scenarios (BotoCoreError, unexpected errors)
- Verify proper timestamp handling including None values
- Test parameter validation and edge cases
- Ensure proper error reporting through MCP context

* test(healthomics): add comprehensive unit tests for models and fix validation

- Add tests for all enum classes (WorkflowType, StorageType, CacheBehavior, etc.)
- Add tests for all model classes with full and minimal field scenarios
- Test model validation including edge cases and error conditions
- Test model serialization and JSON serialization
- Fix StorageRequest validation to properly check STATIC storage requirements
- Improve enum membership testing for Python 3.10 compatibility
- Add comprehensive validation error testing

* fix(tests): resolve failing test suite issues

- Add missing mock_boto_client fixture to conftest.py
- Fix incorrect mock patching paths in workflow_management tests
- Handle both string and datetime objects in creationTime processing
- Update test assertions to match actual code behavior for nextToken
- Correct error message assertions in exception handling tests

Resolves 5 failing tests, bringing total to 106 passing tests with 62% coverage.

* feat!: remove validate_workflow tool

BREAKING CHANGE: The ValidateWorkflow tool has been completely removed from the MCP server.

- Remove validate_workflow function from helper_tools.py
- Remove ValidateWorkflow tool registration from server.py
- Remove unused workflow type constants from consts.py
- Delete wdl_utils.py module (no longer needed)
- Remove related imports and error message constants

This simplifies the codebase by removing workflow validation functionality
that was not core to the HealthOmics service integration.

* fix(workflow): correct get_workflow parameter template handling

- Change export_type parameter to export_definition boolean
- Remove incorrect PARAMETER_TEMPLATE export type (not supported by AWS API)
- Parameter template is always included in standard get_workflow response
- Update all test cases to use new export_definition parameter
- Remove invalid export type validation test
- Clean up unused constants and error messages

The parameter template is a standard field in the boto3 get_workflow response,
not an export type. Only DEFINITION can be exported via the export parameter.

* fix(workflow): clarify get_workflow export_definition behavior

- Update parameter description to clarify it returns a presigned URL
- Update function docstring to explain presigned URL behavior
- Fix test to use realistic presigned URL format instead of workflow content
- Add test case for workflow retrieval without export definition
- Improve test assertions to verify presigned URL characteristics

The export_definition parameter provides a presigned URL for downloading
the workflow definition ZIP file, not the actual workflow content.

* feat(workflow): add statusMessage field to get_workflow response

- Include statusMessage field from AWS API response when present
- Add conditional handling to only include statusMessage if it exists
- Add test case specifically for workflows with status messages
- Update existing test to verify statusMessage is properly included
- Enhance test coverage for different workflow states (ACTIVE, FAILED)

The statusMessage field provides additional context about workflow status,
especially useful for failed workflows or workflows in transition states.

* fix(workflow): correct export parameter type in get_workflow

- Change export parameter from string to list as required by AWS API
- Update from 'DEFINITION' to ['DEFINITION'] to match API specification
- Fix test assertion to expect list parameter in API call
- Resolves parameter validation error in MCP Inspector

The AWS HealthOmics get_workflow API expects the export parameter to be
a list of export types, not a single string value.

* fix(typing): corrects type hint

* test: add comprehensive tests for CreateWorkflow, CreateWorkflowVersion, StartRun, and ListRunTasks

- Add 18 new test cases covering success, error, and edge case scenarios
- Test CreateWorkflow with minimal and full parameters, base64 validation, and error handling
- Test CreateWorkflowVersion with static/dynamic storage, capacity validation, and error scenarios
- Test StartRun with different storage types, cache configuration, and parameter validation
- Test ListRunTasks with pagination, filtering, and error handling
- Fix test parameter passing to match function signatures with Field annotations
- Update test assertions to match actual AWS API parameter names (workflowId vs id)
- Improve test coverage significantly:
  - workflow_execution.py: 48% → 75% coverage
  - workflow_management.py: 55% → 93% coverage
  - Overall project: 64% → 79% coverage

All 125 tests now pass, providing robust validation for the core workflow management
and execution functionality.

* feat(workflow-execution): implement client-side date filtering for ListRuns

- Add client-side filtering for created_after and created_before parameters
- Remove boto3 client date filter parameters (not supported by AWS API)
- Add parse_iso_datetime helper function for datetime parsing
- Add filter_runs_by_creation_time helper function for filtering logic
- Use larger batch size (100) when filtering to reduce API calls
- Add comprehensive test coverage for date filtering functionality
- Add 9 new test cases covering various filtering scenarios
- Maintain backward compatibility for existing functionality
- All 134 tests passing with 79% overall coverage

* feat(workflow-execution): add roleArn and runOutputUri to GetRun response

- Add roleArn field to GetRun tool response for IAM role information
- Add runOutputUri field to GetRun tool response for run output location
- Update all GetRun tests to include the new required fields
- Enhance GetRun docstring to document all returned fields
- Maintain backward compatibility for existing response fields
- All 134 tests passing with no regressions

* refactor(s3-utils): remove unused functions and improve validation

- Remove unused functions: parse_s3_uri, upload_to_s3, download_from_s3
- Enhance ensure_s3_uri_ends_with_slash to validate s3:// prefix
- Add comprehensive test coverage for ensure_s3_uri_ends_with_slash function
- Add 6 new test cases covering valid and invalid URI scenarios
- Improve s3_utils.py coverage from 33% to 100%
- Improve overall test coverage from 79% to 81%
- All 140 tests passing with no regressions

* feat(troubleshooting): enhance diagnose_run_failure with manifest logs and comprehensive task analysis

- Add run manifest log retrieval using get_run_manifest_logs function
- Implement pagination to collect ALL failed tasks (not just first 10)
- Increase task log limits from 50 to 100 for better diagnostics
- Add comprehensive response structure with counts and metadata
- Enhance error handling for datetime fields (support both objects and strings)
- Add 5 new troubleshooting recommendations for better guidance
- Improve summary information with intelligent log availability detection

Enhanced response now includes:
- runUuid for log stream identification
- manifestLogs with workflow summary and resource metrics
- engineLogCount, manifestLogCount, failedTaskCount for quick assessment
- Enhanced task details with logCount per task
- Comprehensive summary with hasManifestLogs/hasEngineLogs flags
- Additional timing and workflow metadata

Test coverage improvements:
- Add 4 new test cases covering edge cases and error scenarios
- Update existing tests to verify new functionality
- Maintain 93% coverage for troubleshooting module
- All 143 tests passing

* fix(troubleshooting): resolve DiagnoseRunFailure Pydantic Field and log stream issues

This commit fixes critical issues in the DiagnoseRunFailure tool that were causing:
1. 'FieldInfo' object has no attribute 'replace' errors
2. ResourceNotFoundException when retrieving CloudWatch logs

## Root Cause Analysis
- Log retrieval functions defined with Pydantic Field decorators were being called
  internally, passing Field objects instead of actual parameter values
- Incorrect CloudWatch log stream naming patterns prevented log retrieval
- Datetime handling code attempted operations on Field objects instead of datetime values

## Changes Made

### workflow_analysis.py
- Added internal wrapper functions without Pydantic Field decorators:
  * get_run_engine_logs_internal()
  * get_run_manifest_logs_internal()
  * get_task_logs_internal()
- Fixed CloudWatch log stream naming patterns:
  * Engine logs: run/{run_id}/engine (was: engine/run/{run_id})
  * Task logs: run/{run_id}/task/{task_id} (was: task/run/{run_id}/{task_id})
- Enhanced datetime string handling with type checking before .replace() calls
- Fixed missing imports for datetime, timezone, and ClientError

### troubleshooting.py
- Updated imports to use internal wrapper functions instead of MCP tool functions
- Added safe_datetime_to_iso() helper function for robust datetime conversion
- Modified all log retrieval calls to use internal functions without ctx parameter

### test_troubleshooting.py
- Updated all test mocks to use new internal function names
- Removed ctx parameter from function call assertions
- Fixed double-replacement issues in function names
- Restored ctx=mock_context parameter to diagnose_run_failure test calls

## Impact
- DiagnoseRunFailure tool now works correctly with real AWS HealthOmics run IDs
- All 143 tests passing with proper log retrieval functionality
- Eliminates Pydantic Field object errors and CloudWatch log access issues
- Maintains backward compatibility for existing MCP tool interfaces

Resolves issues with run ID 5937949 and similar real-world diagnostic scenarios.

* feat(troubleshooting): add time window scoping for log retrieval in DiagnoseRunFailure

Enhance the DiagnoseRunFailure tool to restrict log searches to relevant time windows,
improving performance and focusing on diagnostic-relevant logs.

## Key Features

### Time Window Calculation
- Added calculate_log_time_window() helper function with configurable buffer (default: 5 minutes)
- Supports both datetime objects and ISO format strings
- Robust error handling for invalid inputs

### Enhanced Log Retrieval Scoping
- **Engine Logs**: Scoped to run creation ± 5min to run stop ± 5min
- **Manifest Logs**: Same time window as engine logs (run lifecycle)
- **Task Logs**: Attempts task-specific timing via get_run_task() API, falls back to run timing

### Intelligent Task-Specific Timing
- For each failed task, attempts to retrieve detailed task information
- Uses task creation ± 5min to task stop ± 5min when available
- Falls back to run time window if task-specific timing unavailable
- Logs time window selection for debugging

## Implementation Details

### troubleshooting.py
- Added datetime imports and time window calculation logic
- Enhanced all log retrieval calls with start_time/end_time parameters
- Added task-specific timing retrieval with fallback mechanism
- Improved logging to show selected time windows

### test_troubleshooting.py
- Updated test assertions to include new time parameters
- Added mock for get_run_task() calls in task timing tests
- Added dedicated TestTimeWindowCalculation class with 3 test methods
- All existing functionality preserved with enhanced time scoping

## Benefits
- **Performance**: Reduces log retrieval time by limiting search scope
- **Relevance**: Focuses on logs most likely to contain diagnostic information
- **Efficiency**: Reduces CloudWatch Logs API calls and data transfer
- **Precision**: Task-specific timing provides more accurate log scoping

## Example Time Windows
Run: 2024-01-01T10:00:00Z to 2024-01-01T10:30:00Z
Log Window: 2024-01-01T09:55:00Z to 2024-01-01T10:35:00Z

Task: 2024-01-01T10:05:00Z to 2024-01-01T10:25:00Z
Task Log Window: 2024-01-01T10:00:00Z to 2024-01-01T10:30:00Z

All 146 tests passing with enhanced functionality.

* fix(workflow-analysis): add missing json import for manifest parsing

- Add json import to fix 'name json is not defined' error
- Required for parsing manifest log JSON objects in analyze_run function
- Apply pre-commit formatting fixes

* refactor(workflow-analysis): convert AnalyzeRun from @tool to @prompt

- Move analysis functionality from tools/ to prompts/ directory
- Create dedicated prompts/workflow_analysis.py module
- Replace AnalyzeRun tool with analyze_healthomics_runs prompt
- Update server.py to register prompt instead of tool
- Remove duplicate helper functions from tools/workflow_analysis.py
- Update server instructions to reflect prompt-based approach
- Apply pre-commit formatting fixes

Benefits:
- Better alignment with MCP protocol semantics
- Enables agent-side AI analysis for interactive experience
- Cleaner separation of data retrieval vs AI processing
- More appropriate use of MCP prompt capabilities
- Allows follow-up questions and iterative analysis

The prompt retrieves manifest data and provides structured analysis
instructions, letting the consuming AI agent perform the actual analysis
for a more interactive and flexible user experience.

* fix(naming): standardize prompt naming to PascalCase for consistency

- Change prompt name from 'optimize_healthomics_runs' to 'OptimizeHealthOmicsRuns'
- Update server instructions to use PascalCase for prompt names
- Update test expectations to match PascalCase convention
- Maintain consistency with tool naming convention (PascalCase)
- Fix function import reference in server.py
- Apply pre-commit formatting fixes

This ensures consistent naming across all MCP tools and prompts,
following the established PascalCase convention used throughout
the HealthOmics MCP server.

* fix(prompt): remove ctx parameter from OptimizeHealthOmicsRuns prompt

- Remove Context parameter from optimize_runs_prompt function signature
- Update all helper functions to not require Context parameter
- Remove Context import from prompts/workflow_analysis.py
- Use direct logging instead of ctx.error() for error handling
- Fix MCP Inspector display issue where ctx was shown as required parameter

This resolves the issue where the MCP Inspector incorrectly showed
the internal Context parameter as a required user input for the prompt.
MCP prompts should only expose user-facing parameters, not internal
framework parameters like Context.

* fix(prompt): improve parameter handling and discoverability for AnalyzeHealthOmicsRunPerformance

- Add flexible parameter handling for run_ids to accept JSON arrays, comma-separated strings, or single values
- Rename prompt from OptimizeHealthOmicsRuns to AnalyzeHealthOmicsRunPerformance for better discoverability
- Add comprehensive test coverage for parameter normalization
- Update server instructions to better describe when to use the prompt
- Improve prompt docstring with specific use cases for AI agents

* fix(prompt): resolve JSON serialization error with datetime objects

- Add comprehensive datetime-to-string conversion functions
- Fix JSON serialization error when AWS API returns datetime objects
- Add safe JSON serialization with custom datetime handler
- Convert datetime objects in run responses (creationTime, startTime, stopTime)
- Add recursive datetime conversion for nested data structures
- Add comprehensive test coverage for datetime conversion functionality
- Ensure all datetime objects are converted to ISO format strings before JSON serialization

* feat(prompt) adds HealthOmics considerations to the prompt

* test: improve troubleshooting.py test coverage to 92%

- Add tests for safe_datetime_to_iso function with various input types
- Add tests for calculate_log_time_window with edge cases and invalid inputs
- Coverage improved from 84% to 92%

* test: improve workflow_execution.py test coverage to 86%

- Add tests for error conditions in start_run function
- Add tests for invalid storage types, cache behaviors, and S3 URIs
- Add tests for BotoCoreError and unexpected error handling
- Add tests for get_omics_client failure scenarios
- Fix duplicate function names
- Coverage improved from 76% to 86%

* test: improve workflow_analysis.py test coverage to 48%

- Add tests for get_logs_client function with success and failure scenarios
- Add tests for _get_logs_from_stream function with various parameters
- Add tests for error handling in log retrieval functions
- Remove duplicate class definitions
- Coverage improved from 43% to 48%

* fix: resolve failing workflow_analysis tests

- Fix timestamp assertion issues by checking call parameters instead of exact values
- Fix nextToken handling by using 'nextForwardToken' in mock response
- Remove leftover code fragments causing syntax errors
- All 183 tests now pass successfully

* feat: increase maximum size of manifest log

* test: increase workflow_analysis test coverage from 56% to 100%

- Add comprehensive tests for get_logs_client() error handling
- Add tests for internal wrapper functions (get_run_manifest_logs_internal, get_run_engine_logs_internal, get_task_logs_internal)
- Add extensive tests for _get_run_manifest_logs_internal() function covering all error scenarios
- Add error handling tests for get_run_manifest_logs, get_run_engine_logs, and get_task_logs
- Add tests for BotoCoreError, ClientError, and generic exception handling
- Add edge case tests for empty responses and missing event fields
- Add invalid timestamp handling tests for all log functions
- Increase total test count from 35 to 55 tests
- All tests passing with 100% statement coverage achieved

Covers missing lines: 40-42, 206-261, 332-346, 413-427, 499-502, 504-509, 561-580

* refactor: convert workflow analysis prompt to run analysis tool

- Migrated optimize_runs_prompt from prompts/workflow_analysis.py to tools/run_analysis.py
- Converted prompt to analyze_run_performance tool with proper MCP tool structure
- Enhanced tool to generate comprehensive analysis reports instead of prompts
- Updated server.py to register new tool and remove old prompt registration
- Removed prompts directory as it's no longer needed
- Updated test imports and server test expectations
- Added new test file for run analysis tool functionality
- All 214 tests passing with 75% overall coverage

* test: add comprehensive unit tests for run analysis tool

- Added 33 comprehensive unit tests for run_analysis.py module
- Improved test coverage from 16% to 90% for run_analysis.py
- Added tests for all major functions:
  - _json_serializer with datetime handling and error cases
  - _extract_task_metrics_from_manifest with complete, over/under-provisioned, and edge cases
  - _parse_manifest_for_analysis with valid data, empty events, and error handling
  - _generate_analysis_report with complete data, no runs, and exception handling
  - _get_run_analysis_data with success, missing UUID, and exception scenarios
  - analyze_run_performance with success, no data, exceptions, and run ID normalization
- All tests use proper mocking for AWS services and async operations
- Tests cover both positive and negative scenarios with comprehensive assertions
- Overall project test coverage improved to 92% (236 tests passing)
- Follows testing best practices with clear arrange/act/assert structure

* fix: resolve all pyright type checking issues

- Fixed type annotations for function parameters and return types
- Added proper type hints for Dict[str, Any] variables to resolve assignment issues
- Fixed datetime.isoformat() calls on potentially None values with proper null checks
- Added type: ignore comments for intentional test validation error cases
- Improved error handling in troubleshooting.py with null checks for task_id
- Enhanced ClientError handling with safe dictionary access using .get()
- All 27 pyright errors resolved, maintaining 92% test coverage with 236 passing tests
- Code now passes strict type checking while preserving all functionality

* fix: resolve final pyright type issue in test

- Added type: ignore comment for ClientError test construction
- All pyright type checking issues now resolved (0 errors)
- All 236 tests passing with 92% coverage maintained

* fix: adds docs required by all MCP servers

* fix: corrects directory path

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* chore: add contact for HealthOmics mcp server

* chore: add entry for HealthOmics mcp server

* chore: add HealthOmics MCP categories and TOC

* chore: bump version to 0.0.1

* feat: adds user_agent_extra information to boto3 client

* fix: revert version bump

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* feat: improves the description of the parameters arg for the StartRun tool

* chore: upgrade python packages

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* fix: fixes version string interpolation

* feat: disambiguate tool names to avoid potential name collision issues in some clients that don't group by mcp server name

---------

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* Automatic update of packages

* feat: add cloudwatch-appsignals-mcp-server with initial tools (awslabs#619)

* initial commit: cloudwatch-appsignals-mcp-server

* fix ci/cd

* fix pre-commit hooks for ci/cd

* fix pkg_resources not found

* address pr comments - minor fixes + doc updates

* fix readme format check and uv ci/cd checks

* Update docs/servers/cloudwatch-appsignals-mcp-server.md

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* add __init__.py

* enhance code coverage

* update docker healthcheck script

* precommit checks

---------

Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* Automatic update of packages

* feat(cloudwatch-mcp-server): Add AWS CloudWatch MCP server (awslabs#718)

* feat: Add MCP support for Amazon CloudWatch

* Add support for CloudWatch GetMetricData API and tests

* Add support for CloudWatch Metrics Metadata and Alarm Recommendations

* Support Metrics Insights query on the get_metric_data tool

* Adding initial support for Alarm tooling

* Refactor CloudWatch Logs server and update README for CloudWatch MCP server

* Refactor CloudWatch Logs server and update README for CloudWatch MCP server

* Deprecate CloudWatch Logs Server

* Deprecate CloudWatch Logs server and refactor CloudWatch Logs Tools in CloudWatch MCP server (#6)

* Refactor CloudWatch Logs server and update README for CloudWatch MCP server
* Refactor CloudWatch Logs server and update README for CloudWatch MCP server
* Deprecate CloudWatch Logs Server

* Update initial MCP team review comments

* Fix timestamp issue while running logs insights queries

* Fix timestamp issue while running logs insights queries

* Remove duplicate args comments for get metrics data

* Fix scanner issues and coding style fixes

* Fix scanner issues and coding style fixes (#8)

* Update docker instructions

* Update docker instructions

* Update ruff rules

* Pre commit hooks fixes

* Remove extra file

* Update README to be more specific to CW metrics

* Update README to be more specific to CW metrics

* Add hook fixes

* Fix pyright violations

* Update CloudWatch MCP Owners

* Improve tests coverage of CW MCP by adding negative scenarios

* Prettify CloudWatch Metrics Metadata

* Fix code owners for cw mcp server

* Updated Change log and fixes minor typos for CW MCP

* Deprecate cloudwatch-logs mcp tools

* Fix ruff issues

* Use region as parameter for CW tools instead of forcing customers to set at the env variable

* Remove extra test and update readme

* Fix config for MCP server

---------

Co-authored-by: Gianluca Cacace <cacaceg@amazon.com>
Co-authored-by: Gianluca <gianluca.cacace@gmail.com>
Co-authored-by: Andrea Giuliano <aggiulia@amazon.com>
Co-authored-by: Andrea Giuliano <giulianoand@gmail.com>
Co-authored-by: Goran Modrusan <goran@amazon.com>
Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>

* Automatic update of packages

* feat(dataprocessing-mcp-server): Add AWS Glue Data Catalog MCP server (awslabs#707)

* feat(dataprocessing-mcp-server): AWS Glue Data Catalog mcp tools

* fix(dataprocessing-mcp-server): fix unit test and add README.md

* fix(dataprocessing-mcp-server): add pyrightconfig.json to ignore attribute access type check andadd more unit test for test coverage

* chore: add more unit tests

* fix unit test in test_server.py

* chore(dataprocessing-mcp-server): add more unit test for AWS Glue Data Catalog (#13)

* fix: fix type check failure

* fix(dataprocessing-mcp-server): remove from __future__ import annotations (#25)

* chore(dataprocessing-mcp-server): update documentation (#26)

* fix(aws-dataprocessing-mcp-server): rename project and fix on boto3 client wrappers

* fix(aws-dataprocessing-mcp-server): rename project and fix on boto3 client wrappers

* chore: add pyrightconfig.json

* chore: update the folder name to include aws prefix

* fix(aws-dataprocessing-mcp-server): move pyright config to pyporject.toml and add Resource Restriction policy information in ReadMe

* fix: Update CODEOWNERS to remove linliyu

---------

Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: Vaibhav Naik <naikvaib@amazon.com>

* Automatic update of packages

* feat(cloudwatch-appsignals-mcp-server): Add additional tools for supporting AppSignals APM use cases (awslabs#733)

* initial commit: cloudwatch-appsignals-mcp-server

* fix ci/cd

* fix pre-commit hooks for ci/cd

* fix pkg_resources not found

* address pr comments - minor fixes + doc updates

* fix readme format check and uv ci/cd checks

* Update docs/servers/cloudwatch-appsignals-mcp-server.md

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* add __init__.py

* enhance code coverage

* update docker healthcheck script

* precommit checks

* feat: add additional tools for appsignals-mcp

* Fix pyright complaints

---------

Co-authored-by: yiyuanh <yiyuanh@amazon.com>
Co-authored-by: Michael He <53622546+yiyuan-he@users.noreply.github.com>
Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: yiyuanh <yiyuanh@proton.me>

* Lukas is maintaining the code but without access to approve updates.  Let's give them ownership of the project pls. (awslabs#749)

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* fix: Hardened the transaction breaking protection (awslabs#745)

Added an additional test case and detection for potential breaking
patterns when another statement goes before transaction end command. For
example "select 1; commit; ...".

Co-authored-by: Sergey Konoplev <sergkono@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(dataprocessing-mcp-server): Add Athena Query, Workgroup and Cata… (awslabs#747)

* feat(dataprocessing-mcp-server): Add Athena Query, Workgroup and Catalog tools

* fix(aws-dataprocessing-mcp-server): Fix imports in athena tests

* fix(aws-dataprocessing-mcp-server): Fix server test for asserting instruction

---------

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(dataprocessing-mcp-server): Add EMR-EC2 Cluster, Steps, Instance management tools (awslabs#748)

* feat(dataprocessing-mcp-server): Add EMR-EC2 Cluster, Steps, Instance management tools

* chore(dataprocessing-mcp-server):Add test cases for instance handler

* fix(dataprocessing-mcp-server): fix steps tests cases for invalid params

* Automatic update of packages

* feat(aws-dataprocessing-mcp-server): Add MCP tools for AWS Glue Crawler (awslabs#752)

* feat(dataprocessing-mcp-server): add AWS Glue Crawler MCP tools (#19)

* feat(dataprocessing-mcp-server): add AWS Glue Crawler MCP tools

* chore(dataprocessing-mcp-server): enable AWs Glue Data Catalog classifer and scheduler tools

* chore(aws-dataprocessing-mcp-server): add glue models for crawler

* chore(aws-dataprocessing-mcp-server): rebase and resolve format issue

---------

Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>

* chore:(dataprocessing-mcp-server): Add Doc Update in mkdocs.yml (awslabs#760)

* fix: pages build broken ref (awslabs#761)

* fix: pages build broken ref

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* fix: pages build broken ref

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

---------

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* feat(aws-dataprocessing-mcp-server): Add Glue Commons and ETL Handlers (awslabs#753)

* Add Glue Commons MCP Tools for Glue usage profiles, security configurations, catalog encryption settings, and resource policies

* Validation test fix and reformat files

* chore(dataprocessing-mcp-server): Add unit tests for Glue Commons mcp tools

* Add Glue ETL Handler for Glue Job Tools

* Reformat Glue ETL Handler and tests with precommit

* Fix test_initialization_parameters

* chore(dataprocessing-mcp-server): Add missing docstrings for Glue ETL Handler tests

* chore(dataprocessing-mcp-server): Add Glue Commons and ETL Handlers to Readme

* chore(aws-dataprocessing-mcp-server): Glue models fixes

* chore(aws-dataprocessing-mcp-server): Glue model and commons test fixes

* chore(aws-dataprocessing-mcp-server): Fix formatting issues for Glue commons and etl handlers

* chore(aws-dataprocessing-mcp-server): Fix TypeError in Glue Commons handler

* chore(aws-dataprocessing-mcp-server): Address precommit failure in Glue Commons handler

---------

Co-authored-by: Chris Kha <chrikha@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* fix(aws-dataprocessing-mcp-server): Update README typo for dataprocessing MCP server (awslabs#755)

* Fix: Update README typo for dataprocessing MCP server

* Minor updates on README for typos on MCP refs

---------

Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* fix(aws-dataprocessing-mcp-server): apply next_token on list operation and add get-catalogs MCP tool (awslabs#756)

* fix(aws-dataprocessing-mcp-server): apply next_token for list call and add get-catalogs mcp tool

* chore(aws-dataprocessing-mcp-server): add unit tests to patch converage

* chore: add unit test for code patch

* fix(aws-dataprocessing-mcp-server): add patch test coverage

---------

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(bedrock-kb-retrieval): add ListKnowledgeBases tool (awslabs#715)

* feat(bedrock-kb-retrieval): add ListKnowledgeBases tool

Add ListKnowledgeBases tool to provide an alternative way to discover available knowledge bases, complementing the existing resource endpoint.
Update documentation to reflect both options for knowledge base discovery.

* test(bedrock-kb-retrieval): add tests for ListKnowledgeBases tool

Add comprehensive test coverage for the newly implemented ListKnowledgeBases tool, ensuring consistency with existing test patterns and verifying that it returns the same results as the knowledgebases resource endpoint.

* refactor(bedrock-kb-retrieval): remove knowledgebases_resource and consolidate into ListKnowledgeBases tool

* fix(bedrock-kb-retrieval): update remaining resource references to ListKnowledgeBases tool

---------

Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(dataprocessing-mcp-server): AWS Glue Interactive Sessions and Workflows mcp tools (awslabs#754)

* feat(dataprocessing-mcp-server): AWS Glue Interactive Sessions and Workflows mcp tools

* Fix ruff check errors

* Fix ruff format failures

* Fix merge conflicts

* Add more test coverage

* Fix ruff format failures

* Update the iam read only policy in readme

---------

Co-authored-by: raghav-aws <rvvidyas@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* chore(aws-dataprocessing-mcp-server): Add iam actions for Glue ETL and Commons to readonly policy (awslabs#766)

Co-authored-by: Chris Kha <chrikha@amazon.com>

* docs(cost-analysis-mcp-server): Add deprecation warning (awslabs#772)

* docs: Add deprecation warnings for cost-analysis-mcp-server

* Update README.md

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

---------

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* chore(dataprocessing-mcp-server): Add Service owners for Data Processing MCP server (awslabs#769)

* chore(dataprocessing-mcp-server): Add Service owners for Data Processing MCP server

* fix(dataprocessing-mcp-server): Add aws prefix to the dataprocessing mcp server path

* chore(dataprocessing-mcp-server): Add Athena Integration in Key Features for Data Processing MCP server Read Me

* fix(dataprocessing-mcp-server): Remove @rajendrag from codeowners, will be added later after self invite is complete

* fix(aws-dataprocessing-mcp-server): Fixed MCP managed tagging issue in AWS Glue Data Catalog MCP tools (awslabs#768)

* fix(aws-dataprocessing-mcp-server): fix mcp managed tag issue in AWS Glue Data Catalog MCP tool

* fix(aws-dataprocessing-mcp-server): enable True to hide password for Glue connections

---------

Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>

* refactor: Prometheus MCP server to require workspace_id parameter (awslabs#646)

* Add auto-discovery of Prometheus workspace URL if not provided

* Add function to find active Prometheus workspaces

* Update setup_environment to use config_data and improve workspace discovery flow

* Fix URL construction for Prometheus workspace

* Fix validation error when Prometheus URL is empty

* Improve Prometheus URL handling with better validation and logging

* Fix Prometheus MCP server startup issue with error handling and add run script

* Add SetPrometheusWorkspace tool and fix ExecuteQuery decorator

* Fix duplicate ExecuteQuery decorator and remove redundant SetPrometheusURL tool

* Fix SyntaxError by moving global config declaration to beginning of function

* Fix SyntaxError by adding global config declarations to all functions that use the global variable

* Add dynamic workspace selection functionality

- Add workspace selection prompts for first-time tool usage
- Implement get_available_workspaces() using AWS SDK
- Add ListWorkspaces tool for workspace discovery
- Modify all main tools to check workspace selection
- Allow server startup without pre-configured workspace
- Maintain session persistence once workspace selected

* Fix Pydantic validation error for optional prometheus_url

- Make prometheus_url field optional in PrometheusConfig model
- Update validator to handle None values
- Allows server to start without pre-configured workspace

* Fix ServerInfo validation error for optional aws_profile

- Make aws_profile field optional in ServerInfo model
- Prevents validation error when aws_profile is None

* Refactor MCP tools to require workspace_id parameter for each invocation

* Update README.md with new configuration and workspace_id parameter requirements

* Add license header to run_prometheus_server.sh

* Update tests to work with new workspace_id parameter requirement

* Fix remaining test failures by updating expected values

* Fix all test failures by completely rewriting test files

* Fix remaining test failures

* Fix test_get_available_workspaces assertion

* Fix test_get_available_workspaces region assertion

* refactor: Prometheus MCP server to require workspace_id parameter

* style: Fix end-of-file and formatting issues

* Refactor Prometheus MCP server to use workspace-based configuration

* Fix linting issues in test_workspace_config.py

* Fix formatting issues in test files

* Add more tests to improve coverage

* Fix test_get_available_workspaces_no_config assertion

* Fix duplicate function definitions in test_workspace_config.py

* Add newline at end of file

* Fix test_get_available_workspaces_no_config assertion to be more flexible

* Fix formatting in test_workspace_config.py

* Add user_agent_extra to boto3 clients for prometheus-mcp-server

* Fix tests and apply formatting for user_agent_extra changes

* Remove WORKSPACE_SELECTION_CHANGES.md file

* Update MCP tool docstrings with appropriate input/output examples

* Remove duplicate ExecuteQuery tool decorator from validate_query helper function

* Refactor Prometheus server to create fresh clients for each request

* Refactor to reduce dependency on global config

* Completely remove global config and use explicit parameter passing

* Fix duplicate make_request implementation and remove redundant test_prometheus_connection function

* Update GetAvailableWorkspaces to prompt user for workspace selection

* Update Prometheus MCP server README to use generic AWS region placeholder

* Make workspace_id optional when URL is provided via command line arguments

* Remove unused prometheus_client.py and improve test coverage

- Deleted prometheus_client.py (unused dead code with 53% coverage)
- Removed test_prometheus_client_module.py (tests for dead code)
- Improved overall test coverage from 83% to 94%
- Eliminated duplicate HTTP client implementations
- Reduced codebase complexity and maintenance overhead
- All functionality preserved in server.py PrometheusClient class

* Fix detect-secrets scan by replacing hardcoded mock credentials

- Replace 'test-access-key' and 'test-secret-key' with generic placeholders
- Use 'MOCK_ACCESS_KEY' and 'MOCK_SECRET_KEY' to avoid secrets detection
- Maintains test functionality while passing security scans

* Replace global config with environment variables for uvx command

* Add workspace ID extraction from URL to automatically use configured workspace

* Fix URL substring sanitization test and address test failures

* Update test_tools.py to match new implementation

* Improve test coverage for prometheus-mcp-server to exceed 86.57% target

* Skip problematic tests in test_prometheus_client.py to improve coverage

* Fix pyright type errors in Prometheus MCP server tests

* Fix failing tests by adding proper AWS profile mocking

* Add test_coverage_improvement.py and fix failing tests to improve server.py coverage

* Fix failing tests in test_coverage_improvement.py

* Skip problematic test_aws_credentials_validate test

* Fix pyright type errors with type ignore comments

* Fix failing test_extract_workspace_id_from_url test

* test: improve coverage from 85.81% to 97% (+11.19%)

* fix: pre-commit formatting and linting issues

---------

Co-authored-by: Mohamed Sherif <mdsherif@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>

* docs(cost-analysis-mcp-server): Add deprecation warnings (part 2) (awslabs#774)

* docs: Add deprecation warnings for cost-analysis-mcp-server

* fix: Add missing test coverage

* Automatic update of packages

* feat: replace cost-analysis with aws-pricing MCP Server (awslabs#758)

* refactor: Move files

* Add code-owners

* Update references and move python package

* Fix .github refs

* fix: Fix test

* feat: Rename get_pricing_from_api to get_pricing and remove get_pricing_from_web

* chore: Set version to 1.0.0

* chore: address comments

* docs: Remove deprecation notice

* chore: Fix version

---------

Co-authored-by: Nikolaus Spring <nspri@amazon.de>
Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>

* Automatic update of packages

* feature: add trivy results for scans that fail due to github runner disk space (awslabs#682)

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* fix: aws-diagram-mcp-server to 3.10 python (awslabs#777)

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

---------

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: Jimin Kim <55342650+jimini55@users.noreply.github.com>
Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: Mark Schreiber <mrschre@amazon.com>
Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: awslabs-mcp <203918161+awslabs-mcp@users.noreply.github.com>
Co-authored-by: Michael He <53622546+yiyuan-he@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: Shrikant Tambe <102345260+shri-tambe@users.noreply.github.com>
Co-authored-by: Gianluca Cacace <cacaceg@amazon.com>
Co-authored-by: Gianluca <gianluca.cacace@gmail.com>
Co-authored-by: Andrea Giuliano <aggiulia@amazon.com>
Co-authored-by: Andrea Giuliano <giulianoand@gmail.com>
Co-authored-by: Goran Modrusan <goran@amazon.com>
Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>
Co-authored-by: linliyu <33141797+LiyuanLD@users.noreply.github.com>
Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>
Co-authored-by: Vaibhav Naik <naikvaib@amazon.com>
Co-authored-by: Min Xia <mxiamxia@gmail.com>
Co-authored-by: yiyuanh <yiyuanh@amazon.com>
Co-authored-by: yiyuanh <yiyuanh@proton.me>
Co-authored-by: Mike Chambers <115200191+mikegc-aws@users.noreply.github.com>
Co-authored-by: Sergey Konoplev <gray.ru@gmail.com>
Co-authored-by: Sergey Konoplev <sergkono@amazon.com>
Co-authored-by: Christopher Kha <christopher.kha2000@gmail.com>
Co-authored-by: Chris Kha <chrikha@amazon.com>
Co-authored-by: Santiago Garcia Arango <san99tiago@gmail.com>
Co-authored-by: Tetsu Takizawa <tetsu.takizawa5@gmail.com>
Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>
Co-authored-by: raghav <raghavsagar1997@gmail.com>
Co-authored-by: raghav-aws <rvvidyas@amazon.com>
Co-authored-by: Nikolaus Spring <54682104+nspring00@users.noreply.github.com>
Co-authored-by: MohamedSherifAbdelsamiea <38582068+MohamedSherifAbdelsamiea@users.noreply.github.com>
Co-authored-by: Mohamed Sherif <mdsherif@amazon.com>
Co-authored-by: Nikolaus Spring <nspri@amazon.de>
Co-authored-by: Roman Shevchuk <rshev@amazon.com>
rshevchuk-git added a commit to rshevchuk-git/mcp that referenced this pull request Jul 11, 2025
* docs: Add AI Development clients and enhance documentation/version co… (awslabs#717)

* docs: Add AI Development clients and enhance documentation/version control parts

* fix: formatting, url

* Update VIBE_CODING_TIPS_TRICKS.md

* fix: precommit trailing whitespaces

---------

Co-authored-by: Alain Krok <alkrok@amazon.com>

* feat: Adds an AWS HealthOmics MCP server (awslabs#598)

* feat: initial generation of the server

* feat: Adds intitial design docs

* initial implementations

* feat/ adds supported regions tool and clarifies types

* feat: use MCP style error handling

* feat: improved exception handling

* update current progress

* feat: remove generate_parameter_template tool from helper tools

- Remove generate_parameter_template function from helper_tools.py
- Remove tool registration from server.py
- Remove extract_wdl_inputs and related functions from wdl_utils.py
- Update server instructions to remove GenerateParameterTemplate reference
- Update design document to remove generate_parameter_template section
- Clean up unused imports in wdl_utils.py

This simplifies the helper tools by removing parameter template generation
functionality while keeping workflow validation and packaging tools.

* fix: adjusts model to more closely reflect HealthOmics model

* refactor: seperate log access into different tools

* refactor: adds startFromHead capability to log retrieval tools and uses this in diagnose_run_failure

* test(healthomics): add comprehensive unit tests for log functions

- Add unit tests for get_run_logs, get_run_manifest_logs, get_run_engine_logs, and get_task_logs
- Add unit tests for diagnose_run_failure function
- Refactor diagnose_run_failure to use centralized log functions from workflow_analysis
- Add start_from_head parameter to all log functions with default True
- Update diagnose_run_failure to use start_from_head=False for recent logs
- Fix UTC timezone handling in log timestamp conversion
- Improve error handling with specific ClientError and BotoCoreError handling
- Add comprehensive test fixtures and mocking in conftest.py
- Update test_server.py to properly verify all registered tools
- Update server instructions to document all available tools
- Achieve 89% test coverage for troubleshooting module
- All 33 unit tests passing with proper parameter validation and error scenarios

* docs(healthomics): update design document to reflect current implementation

- Update architecture and directory structure
- Document all 19 implemented tools
- Add recent log function improvements
- Include current test coverage metrics
- Add implementation details for error handling
- Update security considerations and future enhancements

* test(healthomics): add unit tests for get_supported_regions

- Add test cases for successful SSM region retrieval
- Test fallback to hardcoded regions when SSM is empty
- Add error handling tests for BotoCoreError and ClientError
- Test unexpected error handling and context error reporting
- Verify region list sorting and response structure

* test(healthomics): add unit tests for package_workflow tool

- Add comprehensive test suite for package_workflow functionality
- Cover basic workflow packaging, additional files, and error cases
- Test special characters and large file handling
- Ensure proper ZIP structure and content validation
- Verify error handling and context reporting

* test(healthomics): add comprehensive unit tests for workflow execution tools

- Add tests for get_run tool covering success, minimal response, and error cases
- Add tests for list_runs tool with filtering, pagination, and error handling
- Test various AWS error scenarios (BotoCoreError, ClientError, unexpected errors)
- Verify proper timestamp handling including None values
- Test parameter validation and edge cases
- Ensure proper error reporting through MCP context

* fix(healthomics): improve error handling and timestamp processing in workflow execution

- Add specific ClientError handling for better error reporting
- Improve timestamp field handling to check for None values
- Refactor field handling for better maintainability
- Fix potential AttributeError when calling isoformat() on None values

* test(healthomics): add comprehensive unit tests for workflow management tools

- Add tests for list_workflows tool covering success, empty response, and pagination
- Add tests for get_workflow tool with and without export type
- Test various AWS error scenarios (BotoCoreError, unexpected errors)
- Verify proper timestamp handling including None values
- Test parameter validation and edge cases
- Ensure proper error reporting through MCP context

* test(healthomics): add comprehensive unit tests for models and fix validation

- Add tests for all enum classes (WorkflowType, StorageType, CacheBehavior, etc.)
- Add tests for all model classes with full and minimal field scenarios
- Test model validation including edge cases and error conditions
- Test model serialization and JSON serialization
- Fix StorageRequest validation to properly check STATIC storage requirements
- Improve enum membership testing for Python 3.10 compatibility
- Add comprehensive validation error testing

* fix(tests): resolve failing test suite issues

- Add missing mock_boto_client fixture to conftest.py
- Fix incorrect mock patching paths in workflow_management tests
- Handle both string and datetime objects in creationTime processing
- Update test assertions to match actual code behavior for nextToken
- Correct error message assertions in exception handling tests

Resolves 5 failing tests, bringing total to 106 passing tests with 62% coverage.

* feat!: remove validate_workflow tool

BREAKING CHANGE: The ValidateWorkflow tool has been completely removed from the MCP server.

- Remove validate_workflow function from helper_tools.py
- Remove ValidateWorkflow tool registration from server.py
- Remove unused workflow type constants from consts.py
- Delete wdl_utils.py module (no longer needed)
- Remove related imports and error message constants

This simplifies the codebase by removing workflow validation functionality
that was not core to the HealthOmics service integration.

* fix(workflow): correct get_workflow parameter template handling

- Change export_type parameter to export_definition boolean
- Remove incorrect PARAMETER_TEMPLATE export type (not supported by AWS API)
- Parameter template is always included in standard get_workflow response
- Update all test cases to use new export_definition parameter
- Remove invalid export type validation test
- Clean up unused constants and error messages

The parameter template is a standard field in the boto3 get_workflow response,
not an export type. Only DEFINITION can be exported via the export parameter.

* fix(workflow): clarify get_workflow export_definition behavior

- Update parameter description to clarify it returns a presigned URL
- Update function docstring to explain presigned URL behavior
- Fix test to use realistic presigned URL format instead of workflow content
- Add test case for workflow retrieval without export definition
- Improve test assertions to verify presigned URL characteristics

The export_definition parameter provides a presigned URL for downloading
the workflow definition ZIP file, not the actual workflow content.

* feat(workflow): add statusMessage field to get_workflow response

- Include statusMessage field from AWS API response when present
- Add conditional handling to only include statusMessage if it exists
- Add test case specifically for workflows with status messages
- Update existing test to verify statusMessage is properly included
- Enhance test coverage for different workflow states (ACTIVE, FAILED)

The statusMessage field provides additional context about workflow status,
especially useful for failed workflows or workflows in transition states.

* fix(workflow): correct export parameter type in get_workflow

- Change export parameter from string to list as required by AWS API
- Update from 'DEFINITION' to ['DEFINITION'] to match API specification
- Fix test assertion to expect list parameter in API call
- Resolves parameter validation error in MCP Inspector

The AWS HealthOmics get_workflow API expects the export parameter to be
a list of export types, not a single string value.

* fix(typing): corrects type hint

* test: add comprehensive tests for CreateWorkflow, CreateWorkflowVersion, StartRun, and ListRunTasks

- Add 18 new test cases covering success, error, and edge case scenarios
- Test CreateWorkflow with minimal and full parameters, base64 validation, and error handling
- Test CreateWorkflowVersion with static/dynamic storage, capacity validation, and error scenarios
- Test StartRun with different storage types, cache configuration, and parameter validation
- Test ListRunTasks with pagination, filtering, and error handling
- Fix test parameter passing to match function signatures with Field annotations
- Update test assertions to match actual AWS API parameter names (workflowId vs id)
- Improve test coverage significantly:
  - workflow_execution.py: 48% → 75% coverage
  - workflow_management.py: 55% → 93% coverage
  - Overall project: 64% → 79% coverage

All 125 tests now pass, providing robust validation for the core workflow management
and execution functionality.

* feat(workflow-execution): implement client-side date filtering for ListRuns

- Add client-side filtering for created_after and created_before parameters
- Remove boto3 client date filter parameters (not supported by AWS API)
- Add parse_iso_datetime helper function for datetime parsing
- Add filter_runs_by_creation_time helper function for filtering logic
- Use larger batch size (100) when filtering to reduce API calls
- Add comprehensive test coverage for date filtering functionality
- Add 9 new test cases covering various filtering scenarios
- Maintain backward compatibility for existing functionality
- All 134 tests passing with 79% overall coverage

* feat(workflow-execution): add roleArn and runOutputUri to GetRun response

- Add roleArn field to GetRun tool response for IAM role information
- Add runOutputUri field to GetRun tool response for run output location
- Update all GetRun tests to include the new required fields
- Enhance GetRun docstring to document all returned fields
- Maintain backward compatibility for existing response fields
- All 134 tests passing with no regressions

* refactor(s3-utils): remove unused functions and improve validation

- Remove unused functions: parse_s3_uri, upload_to_s3, download_from_s3
- Enhance ensure_s3_uri_ends_with_slash to validate s3:// prefix
- Add comprehensive test coverage for ensure_s3_uri_ends_with_slash function
- Add 6 new test cases covering valid and invalid URI scenarios
- Improve s3_utils.py coverage from 33% to 100%
- Improve overall test coverage from 79% to 81%
- All 140 tests passing with no regressions

* feat(troubleshooting): enhance diagnose_run_failure with manifest logs and comprehensive task analysis

- Add run manifest log retrieval using get_run_manifest_logs function
- Implement pagination to collect ALL failed tasks (not just first 10)
- Increase task log limits from 50 to 100 for better diagnostics
- Add comprehensive response structure with counts and metadata
- Enhance error handling for datetime fields (support both objects and strings)
- Add 5 new troubleshooting recommendations for better guidance
- Improve summary information with intelligent log availability detection

Enhanced response now includes:
- runUuid for log stream identification
- manifestLogs with workflow summary and resource metrics
- engineLogCount, manifestLogCount, failedTaskCount for quick assessment
- Enhanced task details with logCount per task
- Comprehensive summary with hasManifestLogs/hasEngineLogs flags
- Additional timing and workflow metadata

Test coverage improvements:
- Add 4 new test cases covering edge cases and error scenarios
- Update existing tests to verify new functionality
- Maintain 93% coverage for troubleshooting module
- All 143 tests passing

* fix(troubleshooting): resolve DiagnoseRunFailure Pydantic Field and log stream issues

This commit fixes critical issues in the DiagnoseRunFailure tool that were causing:
1. 'FieldInfo' object has no attribute 'replace' errors
2. ResourceNotFoundException when retrieving CloudWatch logs

- Log retrieval functions defined with Pydantic Field decorators were being called
  internally, passing Field objects instead of actual parameter values
- Incorrect CloudWatch log stream naming patterns prevented log retrieval
- Datetime handling code attempted operations on Field objects instead of datetime values

- Added internal wrapper functions without Pydantic Field decorators:
  * get_run_engine_logs_internal()
  * get_run_manifest_logs_internal()
  * get_task_logs_internal()
- Fixed CloudWatch log stream naming patterns:
  * Engine logs: run/{run_id}/engine (was: engine/run/{run_id})
  * Task logs: run/{run_id}/task/{task_id} (was: task/run/{run_id}/{task_id})
- Enhanced datetime string handling with type checking before .replace() calls
- Fixed missing imports for datetime, timezone, and ClientError

- Updated imports to use internal wrapper functions instead of MCP tool functions
- Added safe_datetime_to_iso() helper function for robust datetime conversion
- Modified all log retrieval calls to use internal functions without ctx parameter

- Updated all test mocks to use new internal function names
- Removed ctx parameter from function call assertions
- Fixed double-replacement issues in function names
- Restored ctx=mock_context parameter to diagnose_run_failure test calls

- DiagnoseRunFailure tool now works correctly with real AWS HealthOmics run IDs
- All 143 tests passing with proper log retrieval functionality
- Eliminates Pydantic Field object errors and CloudWatch log access issues
- Maintains backward compatibility for existing MCP tool interfaces

Resolves issues with run ID 5937949 and similar real-world diagnostic scenarios.

* feat(troubleshooting): add time window scoping for log retrieval in DiagnoseRunFailure

Enhance the DiagnoseRunFailure tool to restrict log searches to relevant time windows,
improving performance and focusing on diagnostic-relevant logs.

- Added calculate_log_time_window() helper function with configurable buffer (default: 5 minutes)
- Supports both datetime objects and ISO format strings
- Robust error handling for invalid inputs

- **Engine Logs**: Scoped to run creation ± 5min to run stop ± 5min
- **Manifest Logs**: Same time window as engine logs (run lifecycle)
- **Task Logs**: Attempts task-specific timing via get_run_task() API, falls back to run timing

- For each failed task, attempts to retrieve detailed task information
- Uses task creation ± 5min to task stop ± 5min when available
- Falls back to run time window if task-specific timing unavailable
- Logs time window selection for debugging

- Added datetime imports and time window calculation logic
- Enhanced all log retrieval calls with start_time/end_time parameters
- Added task-specific timing retrieval with fallback mechanism
- Improved logging to show selected time windows

- Updated test assertions to include new time parameters
- Added mock for get_run_task() calls in task timing tests
- Added dedicated TestTimeWindowCalculation class with 3 test methods
- All existing functionality preserved with enhanced time scoping

- **Performance**: Reduces log retrieval time by limiting search scope
- **Relevance**: Focuses on logs most likely to contain diagnostic information
- **Efficiency**: Reduces CloudWatch Logs API calls and data transfer
- **Precision**: Task-specific timing provides more accurate log scoping

Run: 2024-01-01T10:00:00Z to 2024-01-01T10:30:00Z
Log Window: 2024-01-01T09:55:00Z to 2024-01-01T10:35:00Z

Task: 2024-01-01T10:05:00Z to 2024-01-01T10:25:00Z
Task Log Window: 2024-01-01T10:00:00Z to 2024-01-01T10:30:00Z

All 146 tests passing with enhanced functionality.

* fix(workflow-analysis): add missing json import for manifest parsing

- Add json import to fix 'name json is not defined' error
- Required for parsing manifest log JSON objects in analyze_run function
- Apply pre-commit formatting fixes

* refactor(workflow-analysis): convert AnalyzeRun from @tool to @prompt

- Move analysis functionality from tools/ to prompts/ directory
- Create dedicated prompts/workflow_analysis.py module
- Replace AnalyzeRun tool with analyze_healthomics_runs prompt
- Update server.py to register prompt instead of tool
- Remove duplicate helper functions from tools/workflow_analysis.py
- Update server instructions to reflect prompt-based approach
- Apply pre-commit formatting fixes

Benefits:
- Better alignment with MCP protocol semantics
- Enables agent-side AI analysis for interactive experience
- Cleaner separation of data retrieval vs AI processing
- More appropriate use of MCP prompt capabilities
- Allows follow-up questions and iterative analysis

The prompt retrieves manifest data and provides structured analysis
instructions, letting the consuming AI agent perform the actual analysis
for a more interactive and flexible user experience.

* fix(naming): standardize prompt naming to PascalCase for consistency

- Change prompt name from 'optimize_healthomics_runs' to 'OptimizeHealthOmicsRuns'
- Update server instructions to use PascalCase for prompt names
- Update test expectations to match PascalCase convention
- Maintain consistency with tool naming convention (PascalCase)
- Fix function import reference in server.py
- Apply pre-commit formatting fixes

This ensures consistent naming across all MCP tools and prompts,
following the established PascalCase convention used throughout
the HealthOmics MCP server.

* fix(prompt): remove ctx parameter from OptimizeHealthOmicsRuns prompt

- Remove Context parameter from optimize_runs_prompt function signature
- Update all helper functions to not require Context parameter
- Remove Context import from prompts/workflow_analysis.py
- Use direct logging instead of ctx.error() for error handling
- Fix MCP Inspector display issue where ctx was shown as required parameter

This resolves the issue where the MCP Inspector incorrectly showed
the internal Context parameter as a required user input for the prompt.
MCP prompts should only expose user-facing parameters, not internal
framework parameters like Context.

* fix(prompt): improve parameter handling and discoverability for AnalyzeHealthOmicsRunPerformance

- Add flexible parameter handling for run_ids to accept JSON arrays, comma-separated strings, or single values
- Rename prompt from OptimizeHealthOmicsRuns to AnalyzeHealthOmicsRunPerformance for better discoverability
- Add comprehensive test coverage for parameter normalization
- Update server instructions to better describe when to use the prompt
- Improve prompt docstring with specific use cases for AI agents

* fix(prompt): resolve JSON serialization error with datetime objects

- Add comprehensive datetime-to-string conversion functions
- Fix JSON serialization error when AWS API returns datetime objects
- Add safe JSON serialization with custom datetime handler
- Convert datetime objects in run responses (creationTime, startTime, stopTime)
- Add recursive datetime conversion for nested data structures
- Add comprehensive test coverage for datetime conversion functionality
- Ensure all datetime objects are converted to ISO format strings before JSON serialization

* feat(prompt) adds HealthOmics considerations to the prompt

* test: improve troubleshooting.py test coverage to 92%

- Add tests for safe_datetime_to_iso function with various input types
- Add tests for calculate_log_time_window with edge cases and invalid inputs
- Coverage improved from 84% to 92%

* test: improve workflow_execution.py test coverage to 86%

- Add tests for error conditions in start_run function
- Add tests for invalid storage types, cache behaviors, and S3 URIs
- Add tests for BotoCoreError and unexpected error handling
- Add tests for get_omics_client failure scenarios
- Fix duplicate function names
- Coverage improved from 76% to 86%

* test: improve workflow_analysis.py test coverage to 48%

- Add tests for get_logs_client function with success and failure scenarios
- Add tests for _get_logs_from_stream function with various parameters
- Add tests for error handling in log retrieval functions
- Remove duplicate class definitions
- Coverage improved from 43% to 48%

* fix: resolve failing workflow_analysis tests

- Fix timestamp assertion issues by checking call parameters instead of exact values
- Fix nextToken handling by using 'nextForwardToken' in mock response
- Remove leftover code fragments causing syntax errors
- All 183 tests now pass successfully

* feat: increase maximum size of manifest log

* test: increase workflow_analysis test coverage from 56% to 100%

- Add comprehensive tests for get_logs_client() error handling
- Add tests for internal wrapper functions (get_run_manifest_logs_internal, get_run_engine_logs_internal, get_task_logs_internal)
- Add extensive tests for _get_run_manifest_logs_internal() function covering all error scenarios
- Add error handling tests for get_run_manifest_logs, get_run_engine_logs, and get_task_logs
- Add tests for BotoCoreError, ClientError, and generic exception handling
- Add edge case tests for empty responses and missing event fields
- Add invalid timestamp handling tests for all log functions
- Increase total test count from 35 to 55 tests
- All tests passing with 100% statement coverage achieved

Covers missing lines: 40-42, 206-261, 332-346, 413-427, 499-502, 504-509, 561-580

* refactor: convert workflow analysis prompt to run analysis tool

- Migrated optimize_runs_prompt from prompts/workflow_analysis.py to tools/run_analysis.py
- Converted prompt to analyze_run_performance tool with proper MCP tool structure
- Enhanced tool to generate comprehensive analysis reports instead of prompts
- Updated server.py to register new tool and remove old prompt registration
- Removed prompts directory as it's no longer needed
- Updated test imports and server test expectations
- Added new test file for run analysis tool functionality
- All 214 tests passing with 75% overall coverage

* test: add comprehensive unit tests for run analysis tool

- Added 33 comprehensive unit tests for run_analysis.py module
- Improved test coverage from 16% to 90% for run_analysis.py
- Added tests for all major functions:
  - _json_serializer with datetime handling and error cases
  - _extract_task_metrics_from_manifest with complete, over/under-provisioned, and edge cases
  - _parse_manifest_for_analysis with valid data, empty events, and error handling
  - _generate_analysis_report with complete data, no runs, and exception handling
  - _get_run_analysis_data with success, missing UUID, and exception scenarios
  - analyze_run_performance with success, no data, exceptions, and run ID normalization
- All tests use proper mocking for AWS services and async operations
- Tests cover both positive and negative scenarios with comprehensive assertions
- Overall project test coverage improved to 92% (236 tests passing)
- Follows testing best practices with clear arrange/act/assert structure

* fix: resolve all pyright type checking issues

- Fixed type annotations for function parameters and return types
- Added proper type hints for Dict[str, Any] variables to resolve assignment issues
- Fixed datetime.isoformat() calls on potentially None values with proper null checks
- Added type: ignore comments for intentional test validation error cases
- Improved error handling in troubleshooting.py with null checks for task_id
- Enhanced ClientError handling with safe dictionary access using .get()
- All 27 pyright errors resolved, maintaining 92% test coverage with 236 passing tests
- Code now passes strict type checking while preserving all functionality

* fix: resolve final pyright type issue in test

- Added type: ignore comment for ClientError test construction
- All pyright type checking issues now resolved (0 errors)
- All 236 tests passing with 92% coverage maintained

* fix: adds docs required by all MCP servers

* fix: corrects directory path

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* chore: add contact for HealthOmics mcp server

* chore: add entry for HealthOmics mcp server

* chore: add HealthOmics MCP categories and TOC

* chore: bump version to 0.0.1

* feat: adds user_agent_extra information to boto3 client

* fix: revert version bump

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* feat: improves the description of the parameters arg for the StartRun tool

* chore: upgrade python packages

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* fix: fixes version string interpolation

* feat: disambiguate tool names to avoid potential name collision issues in some clients that don't group by mcp server name

---------

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* Automatic update of packages

* feat: add cloudwatch-appsignals-mcp-server with initial tools (awslabs#619)

* initial commit: cloudwatch-appsignals-mcp-server

* fix ci/cd

* fix pre-commit hooks for ci/cd

* fix pkg_resources not found

* address pr comments - minor fixes + doc updates

* fix readme format check and uv ci/cd checks

* Update docs/servers/cloudwatch-appsignals-mcp-server.md

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* add __init__.py

* enhance code coverage

* update docker healthcheck script

* precommit checks

---------

Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* Automatic update of packages

* feat(cloudwatch-mcp-server): Add AWS CloudWatch MCP server (awslabs#718)

* feat: Add MCP support for Amazon CloudWatch

* Add support for CloudWatch GetMetricData API and tests

* Add support for CloudWatch Metrics Metadata and Alarm Recommendations

* Support Metrics Insights query on the get_metric_data tool

* Adding initial support for Alarm tooling

* Refactor CloudWatch Logs server and update README for CloudWatch MCP server

* Refactor CloudWatch Logs server and update README for CloudWatch MCP server

* Deprecate CloudWatch Logs Server

* Deprecate CloudWatch Logs server and refactor CloudWatch Logs Tools in CloudWatch MCP server (#6)

* Refactor CloudWatch Logs server and update README for CloudWatch MCP server
* Refactor CloudWatch Logs server and update README for CloudWatch MCP server
* Deprecate CloudWatch Logs Server

* Update initial MCP team review comments

* Fix timestamp issue while running logs insights queries

* Fix timestamp issue while running logs insights queries

* Remove duplicate args comments for get metrics data

* Fix scanner issues and coding style fixes

* Fix scanner issues and coding style fixes (#8)

* Update docker instructions

* Update docker instructions

* Update ruff rules

* Pre commit hooks fixes

* Remove extra file

* Update README to be more specific to CW metrics

* Update README to be more specific to CW metrics

* Add hook fixes

* Fix pyright violations

* Update CloudWatch MCP Owners

* Improve tests coverage of CW MCP by adding negative scenarios

* Prettify CloudWatch Metrics Metadata

* Fix code owners for cw mcp server

* Updated Change log and fixes minor typos for CW MCP

* Deprecate cloudwatch-logs mcp tools

* Fix ruff issues

* Use region as parameter for CW tools instead of forcing customers to set at the env variable

* Remove extra test and update readme

* Fix config for MCP server

---------

Co-authored-by: Gianluca Cacace <cacaceg@amazon.com>
Co-authored-by: Gianluca <gianluca.cacace@gmail.com>
Co-authored-by: Andrea Giuliano <aggiulia@amazon.com>
Co-authored-by: Andrea Giuliano <giulianoand@gmail.com>
Co-authored-by: Goran Modrusan <goran@amazon.com>
Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>

* Automatic update of packages

* feat(dataprocessing-mcp-server): Add AWS Glue Data Catalog MCP server (awslabs#707)

* feat(dataprocessing-mcp-server): AWS Glue Data Catalog mcp tools

* fix(dataprocessing-mcp-server): fix unit test and add README.md

* fix(dataprocessing-mcp-server): add pyrightconfig.json to ignore attribute access type check andadd more unit test for test coverage

* chore: add more unit tests

* fix unit test in test_server.py

* chore(dataprocessing-mcp-server): add more unit test for AWS Glue Data Catalog (#13)

* fix: fix type check failure

* fix(dataprocessing-mcp-server): remove from __future__ import annotations (#25)

* chore(dataprocessing-mcp-server): update documentation (#26)

* fix(aws-dataprocessing-mcp-server): rename project and fix on boto3 client wrappers

* fix(aws-dataprocessing-mcp-server): rename project and fix on boto3 client wrappers

* chore: add pyrightconfig.json

* chore: update the folder name to include aws prefix

* fix(aws-dataprocessing-mcp-server): move pyright config to pyporject.toml and add Resource Restriction policy information in ReadMe

* fix: Update CODEOWNERS to remove linliyu

---------

Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: Vaibhav Naik <naikvaib@amazon.com>

* Automatic update of packages

* feat(cloudwatch-appsignals-mcp-server): Add additional tools for supporting AppSignals APM use cases (awslabs#733)

* initial commit: cloudwatch-appsignals-mcp-server

* fix ci/cd

* fix pre-commit hooks for ci/cd

* fix pkg_resources not found

* address pr comments - minor fixes + doc updates

* fix readme format check and uv ci/cd checks

* Update docs/servers/cloudwatch-appsignals-mcp-server.md

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* add __init__.py

* enhance code coverage

* update docker healthcheck script

* precommit checks

* feat: add additional tools for appsignals-mcp

* Fix pyright complaints

---------

Co-authored-by: yiyuanh <yiyuanh@amazon.com>
Co-authored-by: Michael He <53622546+yiyuan-he@users.noreply.github.com>
Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: yiyuanh <yiyuanh@proton.me>

* Lukas is maintaining the code but without access to approve updates.  Let's give them ownership of the project pls. (awslabs#749)

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* fix: Hardened the transaction breaking protection (awslabs#745)

Added an additional test case and detection for potential breaking
patterns when another statement goes before transaction end command. For
example "select 1; commit; ...".

Co-authored-by: Sergey Konoplev <sergkono@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(dataprocessing-mcp-server): Add Athena Query, Workgroup and Cata… (awslabs#747)

* feat(dataprocessing-mcp-server): Add Athena Query, Workgroup and Catalog tools

* fix(aws-dataprocessing-mcp-server): Fix imports in athena tests

* fix(aws-dataprocessing-mcp-server): Fix server test for asserting instruction

---------

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(dataprocessing-mcp-server): Add EMR-EC2 Cluster, Steps, Instance management tools (awslabs#748)

* feat(dataprocessing-mcp-server): Add EMR-EC2 Cluster, Steps, Instance management tools

* chore(dataprocessing-mcp-server):Add test cases for instance handler

* fix(dataprocessing-mcp-server): fix steps tests cases for invalid params

* Automatic update of packages

* feat(aws-dataprocessing-mcp-server): Add MCP tools for AWS Glue Crawler (awslabs#752)

* feat(dataprocessing-mcp-server): add AWS Glue Crawler MCP tools (#19)

* feat(dataprocessing-mcp-server): add AWS Glue Crawler MCP tools

* chore(dataprocessing-mcp-server): enable AWs Glue Data Catalog classifer and scheduler tools

* chore(aws-dataprocessing-mcp-server): add glue models for crawler

* chore(aws-dataprocessing-mcp-server): rebase and resolve format issue

---------

Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>

* chore:(dataprocessing-mcp-server): Add Doc Update in mkdocs.yml (awslabs#760)

* fix: pages build broken ref (awslabs#761)

* fix: pages build broken ref

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* fix: pages build broken ref

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

---------

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* feat(aws-dataprocessing-mcp-server): Add Glue Commons and ETL Handlers (awslabs#753)

* Add Glue Commons MCP Tools for Glue usage profiles, security configurations, catalog encryption settings, and resource policies

* Validation test fix and reformat files

* chore(dataprocessing-mcp-server): Add unit tests for Glue Commons mcp tools

* Add Glue ETL Handler for Glue Job Tools

* Reformat Glue ETL Handler and tests with precommit

* Fix test_initialization_parameters

* chore(dataprocessing-mcp-server): Add missing docstrings for Glue ETL Handler tests

* chore(dataprocessing-mcp-server): Add Glue Commons and ETL Handlers to Readme

* chore(aws-dataprocessing-mcp-server): Glue models fixes

* chore(aws-dataprocessing-mcp-server): Glue model and commons test fixes

* chore(aws-dataprocessing-mcp-server): Fix formatting issues for Glue commons and etl handlers

* chore(aws-dataprocessing-mcp-server): Fix TypeError in Glue Commons handler

* chore(aws-dataprocessing-mcp-server): Address precommit failure in Glue Commons handler

---------

Co-authored-by: Chris Kha <chrikha@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* fix(aws-dataprocessing-mcp-server): Update README typo for dataprocessing MCP server (awslabs#755)

* Fix: Update README typo for dataprocessing MCP server

* Minor updates on README for typos on MCP refs

---------

Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* fix(aws-dataprocessing-mcp-server): apply next_token on list operation and add get-catalogs MCP tool (awslabs#756)

* fix(aws-dataprocessing-mcp-server): apply next_token for list call and add get-catalogs mcp tool

* chore(aws-dataprocessing-mcp-server): add unit tests to patch converage

* chore: add unit test for code patch

* fix(aws-dataprocessing-mcp-server): add patch test coverage

---------

Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(bedrock-kb-retrieval): add ListKnowledgeBases tool (awslabs#715)

* feat(bedrock-kb-retrieval): add ListKnowledgeBases tool

Add ListKnowledgeBases tool to provide an alternative way to discover available knowledge bases, complementing the existing resource endpoint.
Update documentation to reflect both options for knowledge base discovery.

* test(bedrock-kb-retrieval): add tests for ListKnowledgeBases tool

Add comprehensive test coverage for the newly implemented ListKnowledgeBases tool, ensuring consistency with existing test patterns and verifying that it returns the same results as the knowledgebases resource endpoint.

* refactor(bedrock-kb-retrieval): remove knowledgebases_resource and consolidate into ListKnowledgeBases tool

* fix(bedrock-kb-retrieval): update remaining resource references to ListKnowledgeBases tool

---------

Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* feat(dataprocessing-mcp-server): AWS Glue Interactive Sessions and Workflows mcp tools (awslabs#754)

* feat(dataprocessing-mcp-server): AWS Glue Interactive Sessions and Workflows mcp tools

* Fix ruff check errors

* Fix ruff format failures

* Fix merge conflicts

* Add more test coverage

* Fix ruff format failures

* Update the iam read only policy in readme

---------

Co-authored-by: raghav-aws <rvvidyas@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

* chore(aws-dataprocessing-mcp-server): Add iam actions for Glue ETL and Commons to readonly policy (awslabs#766)

Co-authored-by: Chris Kha <chrikha@amazon.com>

* docs(cost-analysis-mcp-server): Add deprecation warning (awslabs#772)

* docs: Add deprecation warnings for cost-analysis-mcp-server

* Update README.md

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

---------

Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* chore(dataprocessing-mcp-server): Add Service owners for Data Processing MCP server (awslabs#769)

* chore(dataprocessing-mcp-server): Add Service owners for Data Processing MCP server

* fix(dataprocessing-mcp-server): Add aws prefix to the dataprocessing mcp server path

* chore(dataprocessing-mcp-server): Add Athena Integration in Key Features for Data Processing MCP server Read Me

* fix(dataprocessing-mcp-server): Remove @rajendrag from codeowners, will be added later after self invite is complete

* fix(aws-dataprocessing-mcp-server): Fixed MCP managed tagging issue in AWS Glue Data Catalog MCP tools (awslabs#768)

* fix(aws-dataprocessing-mcp-server): fix mcp managed tag issue in AWS Glue Data Catalog MCP tool

* fix(aws-dataprocessing-mcp-server): enable True to hide password for Glue connections

---------

Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>

* refactor: Prometheus MCP server to require workspace_id parameter (awslabs#646)

* Add auto-discovery of Prometheus workspace URL if not provided

* Add function to find active Prometheus workspaces

* Update setup_environment to use config_data and improve workspace discovery flow

* Fix URL construction for Prometheus workspace

* Fix validation error when Prometheus URL is empty

* Improve Prometheus URL handling with better validation and logging

* Fix Prometheus MCP server startup issue with error handling and add run script

* Add SetPrometheusWorkspace tool and fix ExecuteQuery decorator

* Fix duplicate ExecuteQuery decorator and remove redundant SetPrometheusURL tool

* Fix SyntaxError by moving global config declaration to beginning of function

* Fix SyntaxError by adding global config declarations to all functions that use the global variable

* Add dynamic workspace selection functionality

- Add workspace selection prompts for first-time tool usage
- Implement get_available_workspaces() using AWS SDK
- Add ListWorkspaces tool for workspace discovery
- Modify all main tools to check workspace selection
- Allow server startup without pre-configured workspace
- Maintain session persistence once workspace selected

* Fix Pydantic validation error for optional prometheus_url

- Make prometheus_url field optional in PrometheusConfig model
- Update validator to handle None values
- Allows server to start without pre-configured workspace

* Fix ServerInfo validation error for optional aws_profile

- Make aws_profile field optional in ServerInfo model
- Prevents validation error when aws_profile is None

* Refactor MCP tools to require workspace_id parameter for each invocation

* Update README.md with new configuration and workspace_id parameter requirements

* Add license header to run_prometheus_server.sh

* Update tests to work with new workspace_id parameter requirement

* Fix remaining test failures by updating expected values

* Fix all test failures by completely rewriting test files

* Fix remaining test failures

* Fix test_get_available_workspaces assertion

* Fix test_get_available_workspaces region assertion

* refactor: Prometheus MCP server to require workspace_id parameter

* style: Fix end-of-file and formatting issues

* Refactor Prometheus MCP server to use workspace-based configuration

* Fix linting issues in test_workspace_config.py

* Fix formatting issues in test files

* Add more tests to improve coverage

* Fix test_get_available_workspaces_no_config assertion

* Fix duplicate function definitions in test_workspace_config.py

* Add newline at end of file

* Fix test_get_available_workspaces_no_config assertion to be more flexible

* Fix formatting in test_workspace_config.py

* Add user_agent_extra to boto3 clients for prometheus-mcp-server

* Fix tests and apply formatting for user_agent_extra changes

* Remove WORKSPACE_SELECTION_CHANGES.md file

* Update MCP tool docstrings with appropriate input/output examples

* Remove duplicate ExecuteQuery tool decorator from validate_query helper function

* Refactor Prometheus server to create fresh clients for each request

* Refactor to reduce dependency on global config

* Completely remove global config and use explicit parameter passing

* Fix duplicate make_request implementation and remove redundant test_prometheus_connection function

* Update GetAvailableWorkspaces to prompt user for workspace selection

* Update Prometheus MCP server README to use generic AWS region placeholder

* Make workspace_id optional when URL is provided via command line arguments

* Remove unused prometheus_client.py and improve test coverage

- Deleted prometheus_client.py (unused dead code with 53% coverage)
- Removed test_prometheus_client_module.py (tests for dead code)
- Improved overall test coverage from 83% to 94%
- Eliminated duplicate HTTP client implementations
- Reduced codebase complexity and maintenance overhead
- All functionality preserved in server.py PrometheusClient class

* Fix detect-secrets scan by replacing hardcoded mock credentials

- Replace 'test-access-key' and 'test-secret-key' with generic placeholders
- Use 'MOCK_ACCESS_KEY' and 'MOCK_SECRET_KEY' to avoid secrets detection
- Maintains test functionality while passing security scans

* Replace global config with environment variables for uvx command

* Add workspace ID extraction from URL to automatically use configured workspace

* Fix URL substring sanitization test and address test failures

* Update test_tools.py to match new implementation

* Improve test coverage for prometheus-mcp-server to exceed 86.57% target

* Skip problematic tests in test_prometheus_client.py to improve coverage

* Fix pyright type errors in Prometheus MCP server tests

* Fix failing tests by adding proper AWS profile mocking

* Add test_coverage_improvement.py and fix failing tests to improve server.py coverage

* Fix failing tests in test_coverage_improvement.py

* Skip problematic test_aws_credentials_validate test

* Fix pyright type errors with type ignore comments

* Fix failing test_extract_workspace_id_from_url test

* test: improve coverage from 85.81% to 97% (+11.19%)

* fix: pre-commit formatting and linting issues

---------

Co-authored-by: Mohamed Sherif <mdsherif@amazon.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>

* docs(cost-analysis-mcp-server): Add deprecation warnings (part 2) (awslabs#774)

* docs: Add deprecation warnings for cost-analysis-mcp-server

* fix: Add missing test coverage

* Automatic update of packages

* feat: replace cost-analysis with aws-pricing MCP Server (awslabs#758)

* refactor: Move files

* Add code-owners

* Update references and move python package

* Fix .github refs

* fix: Fix test

* feat: Rename get_pricing_from_api to get_pricing and remove get_pricing_from_web

* chore: Set version to 1.0.0

* chore: address comments

* docs: Remove deprecation notice

* chore: Fix version

---------

Co-authored-by: Nikolaus Spring <nspri@amazon.de>
Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>

* Automatic update of packages

* feature: add trivy results for scans that fail due to github runner disk space (awslabs#682)

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>

* fix: aws-diagram-mcp-server to 3.10 python (awslabs#777)

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>

---------

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: Jimin Kim <55342650+jimini55@users.noreply.github.com>
Co-authored-by: Alain Krok <alkrok@amazon.com>
Co-authored-by: Mark Schreiber <mrschre@amazon.com>
Co-authored-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
Co-authored-by: awslabs-mcp <203918161+awslabs-mcp@users.noreply.github.com>
Co-authored-by: Michael He <53622546+yiyuan-he@users.noreply.github.com>
Co-authored-by: alexa-perlov <56009415+alexa-perlov@users.noreply.github.com>
Co-authored-by: Shrikant Tambe <102345260+shri-tambe@users.noreply.github.com>
Co-authored-by: Gianluca Cacace <cacaceg@amazon.com>
Co-authored-by: Gianluca <gianluca.cacace@gmail.com>
Co-authored-by: Andrea Giuliano <aggiulia@amazon.com>
Co-authored-by: Andrea Giuliano <giulianoand@gmail.com>
Co-authored-by: Goran Modrusan <goran@amazon.com>
Co-authored-by: Dinesh Sajwan <sajwandinesh03@gmail.com>
Co-authored-by: linliyu <33141797+LiyuanLD@users.noreply.github.com>
Co-authored-by: Vaibhav Naik <101835362+naikvaib@users.noreply.github.com>
Co-authored-by: Vaibhav Naik <naikvaib@amazon.com>
Co-authored-by: Min Xia <mxiamxia@gmail.com>
Co-authored-by: yiyuanh <yiyuanh@amazon.com>
Co-authored-by: yiyuanh <yiyuanh@proton.me>
Co-authored-by: Mike Chambers <115200191+mikegc-aws@users.noreply.github.com>
Co-authored-by: Sergey Konoplev <gray.ru@gmail.com>
Co-authored-by: Sergey Konoplev <sergkono@amazon.com>
Co-authored-by: Christopher Kha <christopher.kha2000@gmail.com>
Co-authored-by: Chris Kha <chrikha@amazon.com>
Co-authored-by: Santiago Garcia Arango <san99tiago@gmail.com>
Co-authored-by: Tetsu Takizawa <tetsu.takizawa5@gmail.com>
Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>
Co-authored-by: raghav <raghavsagar1997@gmail.com>
Co-authored-by: raghav-aws <rvvidyas@amazon.com>
Co-authored-by: Nikolaus Spring <54682104+nspring00@users.noreply.github.com>
Co-authored-by: MohamedSherifAbdelsamiea <38582068+MohamedSherifAbdelsamiea@users.noreply.github.com>
Co-authored-by: Mohamed Sherif <mdsherif@amazon.com>
Co-authored-by: Nikolaus Spring <nspri@amazon.de>
Co-authored-by: Roman Shevchuk <rshev@amazon.com>
CodeChanning pushed a commit to CodeChanning/mcp that referenced this pull request Jul 14, 2025
* refactor: Move files

* Add code-owners

* Update references and move python package

* Fix .github refs

* fix: Fix test

* feat: Rename get_pricing_from_api to get_pricing and remove get_pricing_from_web

* chore: Set version to 1.0.0

* chore: address comments

* docs: Remove deprecation notice

* chore: Fix version

---------

Co-authored-by: Nikolaus Spring <nspri@amazon.de>
Co-authored-by: Laith Al-Saadoon <9553966+theagenticguy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants