Skip to main content
Glama

networkinsights_list_scopes

Retrieve a JSON list of all Network Access Scopes in a specified AWS region. Use parameters like 'aws_region' to filter results.

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

NameRequiredDescriptionDefault
aws_regionYes

Input Schema (JSON Schema)

{ "properties": { "aws_region": { "title": "Aws Region", "type": "string" } }, "required": [ "aws_region" ], "title": "networkinsights_list_scopesArguments", "type": "object" }

Implementation Reference

  • The main handler function for the 'networkinsights_list_scopes' tool. It uses the EC2 boto3 client to describe network insights access scopes in the specified AWS region and returns the result as a JSON string. The @mcp.tool() decorator registers this function as an MCP tool, automatically generating the schema from the function signature.
    @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 on the networkinsights_list_scopes function registers it as an MCP tool named 'networkinsights_list_scopes'.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Brucedh/aws-ireveal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server