networkinsights_list_scopes
List all Network Access Scopes in your AWS region to analyze and manage network security configurations.
Instructions
Describe all Network Access Scopes in the region.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
Returns:
JSON list of NetworkInsightsAccessScope objects.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aws_region | Yes |
Implementation Reference
- server.py:813-827 (handler)The main handler function for the 'networkinsights_list_scopes' tool. It is registered via the @mcp.tool() decorator and uses the EC2 boto3 client to describe all Network Access Scopes in the specified AWS region, returning the result as a JSON string.@mcp.tool() async def networkinsights_list_scopes(aws_region: str) -> str: """ Describe all Network Access Scopes in the region. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. Returns: JSON list of NetworkInsightsAccessScope objects. """ client = boto3.client('ec2', region_name=aws_region) resp = client.describe_network_insights_access_scopes() scopes = resp.get('NetworkInsightsAccessScopes', []) return json.dumps(scopes, indent=2, cls=DateTimeEncoder)
- server.py:813-813 (registration)The @mcp.tool() decorator registers the networkinsights_list_scopes function as an MCP tool.@mcp.tool()