cloudtrail_describe_trails
Retrieve detailed information about all CloudTrail trails in your AWS account to monitor and audit activity effectively.
Instructions
Describe all CloudTrail trails configured in the AWS account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:18-29 (handler)The main handler function for the 'cloudtrail_describe_trails' tool. It creates a boto3 CloudTrail client and calls describe_trails() to list all trails in the account. This function is also registered as a tool via the @mcp.tool() decorator.@mcp.tool() async def cloudtrail_describe_trails() -> list: """ Describe all CloudTrail trails configured in the AWS account. """ try: cloudtrail_client = boto3.client('cloudtrail') response = cloudtrail_client.describe_trails() trails = response.get('trailList', []) return trails except Exception as e: return f"Error describing trails: {str(e)}"
- server.py:18-18 (registration)The @mcp.tool() decorator registers the cloudtrail_describe_trails function as an MCP tool.@mcp.tool()