Skip to main content
Glama
Brucedh

AWS‑IReveal‑MCP

config_describe_compliance_by_resource

List AWS resource compliance summaries with optional filtering by resource type to identify configuration issues.

Instructions

List compliance summaries for resources, optionally filtered by type.

Parameters:
  aws_region (str): The AWS region - use 'us-east-1' if not specified.
  resource_type (str): optional AWS resource type filter.

Returns:
  JSON list of ComplianceByResource objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aws_regionYes
resource_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function implementing the tool logic: calls AWS Config API to describe compliance by resource, filters optionally by type, returns JSON list of ComplianceByResources. The @mcp.tool() decorator registers it as a tool.
    @mcp.tool()
    async def config_describe_compliance_by_resource(
        aws_region: str,
        resource_type: str = None
    ) -> str:
        """
        List compliance summaries for resources, optionally filtered by type.
    
        Parameters:
          aws_region (str): The AWS region - use 'us-east-1' if not specified.
          resource_type (str): optional AWS resource type filter.
    
        Returns:
          JSON list of ComplianceByResource objects.
        """
        client = boto3.client('config', region_name=aws_region)
        params = {}
        if resource_type:
            params["ResourceType"] = resource_type
        resp = client.describe_compliance_by_resource(**params)
        compliances = resp.get("ComplianceByResources", [])
        return json.dumps(compliances, indent=2)
  • server.py:763-763 (registration)
    MCP decorator that registers the function as a tool named after the function.
    @mcp.tool()
  • Supporting prompt that takes the JSON output from this tool and analyzes compliance data for non-compliant resources and remediation.
    async def summarize_config_compliance(compliance_data: str) -> str:
        """
        Given AWS Config compliance summaries, identify non-compliant resources,
        explain the violated rules, and recommend corrective actions to achieve
        compliance.
        
        Parameters:
          compliance_data (str): JSON list of ComplianceByResource objects.
        """
        return (
            f"Analyze the following AWS Config compliance data. Identify which "
            f"resources are non-compliant, describe the specific rules they violate, "
            f"and provide concise remediation steps to bring them into compliance:\n\n{compliance_data}"
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions listing and filtering but lacks details on permissions, rate limits, pagination, or error handling. For a tool that likely interacts with AWS Config, this is insufficient to inform the agent about operational constraints or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: the first sentence states the purpose, followed by clear sections for parameters and returns. Every sentence adds value without redundancy, making it easy for an agent to parse quickly and efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations), the description covers the basics: purpose, parameters, and returns. However, it lacks behavioral context (e.g., AWS authentication needs, potential errors) and doesn't leverage sibling tool names for differentiation. The presence of an output schema reduces the need to detail return values, but overall completeness is only adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context: 'aws_region' is explained with a default value ('use 'us-east-1' if not specified'), and 'resource_type' is clarified as an optional filter. This goes beyond the bare schema, though it doesn't detail possible resource type values or format constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'List compliance summaries for resources, optionally filtered by type.' It specifies the verb ('List') and resource ('compliance summaries for resources'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'config_describe_config_rules' or 'config_list_discovered_resources', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: it mentions optional filtering by type but doesn't specify when to use this tool versus alternatives like 'config_describe_config_rules' or 'config_get_resource_config_history'. No context, prerequisites, or exclusions are given, leaving the agent with little direction on appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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