Skip to main content
Glama
Brucedh

AWS‑IReveal‑MCP

config_get_resource_config_history

Retrieve configuration snapshots for AWS resources within a specified time range to track changes and audit configurations.

Instructions

Fetch configuration snapshots for a resource between two ISO timestamps.

Parameters:
  aws_region (str): The AWS region - use 'us-east-1' if not specified.
  resource_type (str): e.g. 'AWS::S3::Bucket'.
  resource_id (str): the resource's ARN or ID.
  start_time (str): ISO timestamp, e.g. '2025-04-01T00:00:00Z'.
  end_time   (str): ISO timestamp.
  limit (int): Maximum number of configuration items to return.

Returns:
  JSON list of ConfigurationItem objects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aws_regionYes
resource_typeYes
resource_idYes
start_timeYes
end_timeYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function implementing the 'config_get_resource_config_history' tool. It uses the AWS Config boto3 client to fetch historical configuration snapshots for a specific resource within a time range, serializing the results as JSON.
    @mcp.tool()
    def config_get_resource_config_history(
        aws_region: str,
        resource_type: str,
        resource_id: str,
        start_time: str,
        end_time: str,
        limit: int = 10
    ) -> str:
        """
        Fetch configuration snapshots for a resource between two ISO timestamps.
    
        Parameters:
          aws_region (str): The AWS region - use 'us-east-1' if not specified.
          resource_type (str): e.g. 'AWS::S3::Bucket'.
          resource_id (str): the resource's ARN or ID.
          start_time (str): ISO timestamp, e.g. '2025-04-01T00:00:00Z'.
          end_time   (str): ISO timestamp.
          limit (int): Maximum number of configuration items to return.
    
        Returns:
          JSON list of ConfigurationItem objects.
        """
        client = boto3.client('config', region_name=aws_region)
        # Parse ISO timestamps into datetime (with UTC)
        try:
            start_dt = datetime.datetime.fromisoformat(start_time.replace('Z', '+00:00'))
            end_dt   = datetime.datetime.fromisoformat(end_time.replace('Z', '+00:00'))
        except Exception as e:
            return f"Error parsing timestamps: {e}"
    
        resp = client.get_resource_config_history(
            resourceType=resource_type,
            resourceId=resource_id,
            earlierTime=start_dt,
            laterTime=end_dt,
            limit=limit
        )
        items = resp.get("configurationItems", [])
        return json.dumps(items, indent=2, cls=DateTimeEncoder)
  • Helper class for JSON encoding datetime objects to ISO strings, used in the tool's response serialization.
    class DateTimeEncoder(json.JSONEncoder):
        def default(self, o):
            if isinstance(o, datetime.datetime):
                return o.isoformat()  # Convert datetime to ISO-format string.
            return super().default(o)
  • server.py:722-722 (registration)
    The @mcp.tool() decorator registers this function as an MCP tool, automatically inferring input schema from type hints and docstring.
    @mcp.tool()
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 states the action ('Fetch') and return type ('JSON list of ConfigurationItem objects'), but lacks critical details: it does not mention authentication requirements, rate limits, error conditions, pagination behavior (beyond the 'limit' parameter), or whether this is a read-only operation. For a tool with 6 parameters and no annotation coverage, this is a significant gap.

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 efficiently structured with a clear purpose statement followed by parameter explanations and return information. Every sentence earns its place: the first sentence defines the tool's core function, and subsequent lines provide essential parameter details without redundancy. It is appropriately sized for a tool with multiple parameters.

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 complexity (6 parameters, no annotations, but with an output schema), the description is partially complete. It excels in parameter semantics and purpose clarity but lacks behavioral context (e.g., authentication, errors) and usage guidelines. The output schema likely covers return values, so the description's mention of 'JSON list of ConfigurationItem objects' is adequate but not detailed. Overall, it meets minimum viability with clear gaps in guidance and transparency.

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

Parameters5/5

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

The description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'aws_region' with a default value hint, 'resource_type' with an example, 'resource_id' clarification, timestamp formats, and 'limit' function. This fully compensates for the schema's lack of descriptions, providing clear semantic context for all parameters.

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

Purpose5/5

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

The description clearly states the verb ('Fetch') and resource ('configuration snapshots for a resource'), specifying the temporal scope ('between two ISO timestamps'). It distinguishes itself from sibling tools like 'config_describe_compliance_by_resource' by focusing on historical configuration data rather than compliance or current status.

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 no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as needing AWS Config enabled, or compare it to similar tools like 'config_describe_config_rules' or 'config_list_discovered_resources'. Usage context is implied only through parameter requirements.

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