cloudtrail_describe_trails
Retrieve details of all AWS CloudTrail trails configured in your account to monitor and audit API activity.
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 is decorated with @mcp.tool() which registers it in the MCP server. The function uses the AWS boto3 CloudTrail client to call describe_trails() and returns the list of trails or an error message.@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)}"