accessanalyzer_list_analyzers
List all IAM Access Analyzer analyzers in a specified AWS region to identify and manage access policies.
Instructions
List all IAM Access Analyzer analyzers in the specified region.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
Returns:
str: JSON-formatted list of analyzers.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aws_region | Yes |
Implementation Reference
- server.py:932-946 (handler)The @mcp.tool() decorator registers this async handler function, which implements the 'accessanalyzer_list_analyzers' tool by listing IAM Access Analyzer analyzers in the specified AWS region using boto3 and returning their JSON representation.@mcp.tool() async def accessanalyzer_list_analyzers(aws_region: str) -> str: """ List all IAM Access Analyzer analyzers in the specified region. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. Returns: str: JSON-formatted list of analyzers. """ client = boto3.client('accessanalyzer', region_name=aws_region) response = client.list_analyzers() analyzers = response.get('analyzers', []) return json.dumps(analyzers, indent=2, cls=DateTimeEncoder)
- server.py:932-932 (registration)The @mcp.tool() decorator registers the 'accessanalyzer_list_analyzers' tool with the MCP server, using the function name as the tool name.@mcp.tool()