Skip to main content
Glama

config_list_discovered_resources

Retrieve a JSON list of resource identifiers discovered by AWS Config in a specified AWS region and resource type, enabling efficient resource management and tracking.

Instructions

List resource identifiers that AWS Config has discovered. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. resource_type (str): e.g. 'AWS::EC2::Instance'. Returns: JSON list of resourceIdentifier objects.

Input Schema

NameRequiredDescriptionDefault
aws_regionYes
resource_typeYes

Input Schema (JSON Schema)

{ "properties": { "aws_region": { "title": "Aws Region", "type": "string" }, "resource_type": { "title": "Resource Type", "type": "string" } }, "required": [ "aws_region", "resource_type" ], "title": "config_list_discovered_resourcesArguments", "type": "object" }

Implementation Reference

  • The main handler function for the 'config_list_discovered_resources' MCP tool. It is decorated with @mcp.tool(), which registers it in the FastMCP server. The function paginates through AWS Config's list_discovered_resources API to retrieve all resource identifiers of the specified type in the given region and returns them as JSON.
    @mcp.tool() async def config_list_discovered_resources(aws_region: str, resource_type: str) -> str: """ List resource identifiers that AWS Config has discovered. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. resource_type (str): e.g. 'AWS::EC2::Instance'. Returns: JSON list of resourceIdentifier objects. """ client = boto3.client('config', region_name=aws_region) paginator = client.get_paginator('list_discovered_resources') all_resources = [] for page in paginator.paginate(resourceType=resource_type): all_resources.extend(page.get('resourceIdentifiers', [])) return json.dumps(all_resources, indent=2)

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