Skip to main content
Glama
Brucedh

AWS‑IReveal‑MCP

ec2_describe_flow_logs

Retrieve VPC Flow Logs to monitor network traffic patterns and troubleshoot connectivity issues in AWS environments.

Instructions

Describe one or more VPC Flow Logs.
If no filter is provided, returns all Flow Logs in the region.

Parameters:
  aws_region (str): The AWS region - use 'us-east-1' if not specified.
  flow_log_ids (list[str], optional): List of Flow Log IDs to describe.
  resource_ids (list[str], optional): List of resource IDs to filter by.
  resource_type (str, optional): Type of resource to filter by (e.g. 'VPC', 'NetworkInterface', 'Subnet').
  max_results (int, optional): Maximum number of results to return.

Returns:
    str: JSON-formatted list of Flow Logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aws_regionYes
flow_log_idsNo
resource_idsNo
resource_typeNo
max_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function implementing the 'ec2_describe_flow_logs' tool. It accepts parameters for filtering flow logs by ID, resource ID, type, and max results, uses boto3 EC2 client to call describe_flow_logs API, and returns JSON-formatted results.
    async def ec2_describe_flow_logs(
        aws_region: str,
        flow_log_ids: list[str] = None,
        resource_ids: list[str] = None,
        resource_type: str = None,
        max_results: int = 10
    ) -> str:
        """
        Describe one or more VPC Flow Logs.
        If no filter is provided, returns all Flow Logs in the region.
    
        Parameters:
          aws_region (str): The AWS region - use 'us-east-1' if not specified.
          flow_log_ids (list[str], optional): List of Flow Log IDs to describe.
          resource_ids (list[str], optional): List of resource IDs to filter by.
          resource_type (str, optional): Type of resource to filter by (e.g. 'VPC', 'NetworkInterface', 'Subnet').
          max_results (int, optional): Maximum number of results to return.
    
        Returns:
            str: JSON-formatted list of Flow Logs.
        """
        client = boto3.client('ec2', region_name=aws_region)
        params = {}
        if flow_log_ids:
            params["FlowLogIds"] = flow_log_ids
        if resource_ids:
            params["Filter"] = params.get("Filter", []) + [{
                "Name": "resource-id",
                "Values": resource_ids,
                "MaxResults": max_results
            }]
        if resource_type:
            params["Filter"] = params.get("Filter", []) + [{
                "Name": "resource-type",
                "Values": [resource_type]
            }]
        resp = client.describe_flow_logs(**params)
        return json.dumps(resp.get("FlowLogs", []), indent=2, cls=DateTimeEncoder)
  • server.py:505-505 (registration)
    The @mcp.tool() decorator registers the ec2_describe_flow_logs function as an MCP tool, making it available for invocation.
    @mcp.tool()
  • Type annotations in the function signature define the input schema for the tool parameters, including AWS region and optional filters.
    aws_region: str,
    flow_log_ids: list[str] = None,
    resource_ids: list[str] = None,
    resource_type: str = None,
    max_results: int = 10
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 the default behavior when no filter is given and the return format, but fails to cover critical aspects like authentication needs, rate limits, error handling, or whether this is a read-only operation. This is inadequate for a tool with multiple parameters and no annotation support.

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 appropriately sized, with a clear opening sentence, parameter explanations in a bullet-like format, and a returns section. Every sentence adds value without redundancy, making it easy to scan and understand quickly.

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

Completeness4/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 (5 parameters, 1 required) and the presence of an output schema (which handles return values), the description is mostly complete. It covers purpose, parameters, and basic usage, but lacks behavioral details like authentication or error handling, which are important given the absence of annotations.

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?

The description adds significant value beyond the input schema, which has 0% description coverage. It explains each parameter's purpose, provides a default value for 'aws_region', and clarifies optional vs. required usage. This compensates well for the schema's lack of descriptions, though it could benefit from more detail on parameter formats or 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 with the verb 'Describe' and resource 'VPC Flow Logs', making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'cloudtrail_describe_trails' or 'cloudwatch_describe_log_groups', 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 Guidelines3/5

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

The description provides some implied usage guidance by stating 'If no filter is provided, returns all Flow Logs in the region,' which suggests when to use filters. However, it lacks explicit when-to-use vs. alternatives, prerequisites, or comparisons with sibling tools, leaving gaps in comprehensive guidance.

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