Skip to main content
Glama

guardduty_get_finding_statistics

Retrieve summary statistics for AWS GuardDuty findings to analyze security threats and monitor detection patterns.

Instructions

Get summary statistics for GuardDuty findings for a given detector. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. detector_id (str): The GuardDuty detector ID. Returns: str: JSON-formatted statistics about the findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aws_regionYes
detector_idYes

Implementation Reference

  • The @mcp.tool()-decorated handler function implementing the tool logic. It uses boto3 to call GuardDuty's get_findings_statistics API with COUNT_BY_SEVERITY, returns JSON-formatted statistics, or an error message.
    @mcp.tool() async def guardduty_get_finding_statistics(aws_region: str, detector_id: str) -> str: """ Get summary statistics for GuardDuty findings for a given detector. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. detector_id (str): The GuardDuty detector ID. Returns: str: JSON-formatted statistics about the findings. """ try: client = boto3.client('guardduty', region_name=aws_region) response = client.get_findings_statistics( DetectorId=detector_id, FindingStatisticTypes=['COUNT_BY_SEVERITY'], FindingCriteria={} ) statistics = response.get("FindingStatistics", {}) return json.dumps(statistics, indent=2) except Exception as e: return f"Error getting GuardDuty finding statistics: {str(e)}"
  • server.py:659-659 (registration)
    The @mcp.tool() decorator registers the function as an MCP tool, inferring schema from type hints and docstring.
    @mcp.tool()

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