Skip to main content
Glama

cloudwatch_list_log_streams

List and retrieve log streams from a specified CloudWatch log group in your AWS region. Specify parameters like log group name and limit to return JSON-formatted results.

Instructions

Lists log streams in a specified CloudWatch log group. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. log_group (str): The name of the log group. limit (int): Maximum number of log streams to return. Returns: str: JSON-formatted list of log streams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aws_regionYes
limitNo
log_groupYes

Implementation Reference

  • This is the handler function for the 'cloudwatch_list_log_streams' tool. It is decorated with @mcp.tool(), which registers it with the MCP server. The function uses the boto3 CloudWatch Logs client to describe log streams in the specified log group and returns them as JSON.
    @mcp.tool() async def cloudwatch_list_log_streams( aws_region: str, log_group: str, limit: int = 50 ) -> str: """ Lists log streams in a specified CloudWatch log group. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. log_group (str): The name of the log group. limit (int): Maximum number of log streams to return. Returns: str: JSON-formatted list of log streams. """ try: cw_client = boto3.client('logs', region_name=aws_region) response = cw_client.describe_log_streams(logGroupName=log_group, limit=limit) log_streams = response.get('logStreams', []) return json.dumps(log_streams, indent=2) except Exception as e: return f"Error listing log streams: {str(e)}"

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