Skip to main content
Glama
Brucedh

AWS‑IReveal‑MCP

guardduty_get_findings

Retrieve detailed information for specific AWS GuardDuty security findings to analyze potential threats in your cloud environment.

Instructions

Get detailed information for the specified GuardDuty findings.

Parameters:
  aws_region (str): The AWS region - use 'us-east-1' if not specified.
  detector_id (str): The GuardDuty detector ID.
  finding_ids (list): A list of finding IDs for which to retrieve details.

<IMPORTANT>
The server may crash when the response is too large. To avoid this, pass only max 2 finding IDs at a time. 
The finding_ids list should contain a maximum of 2 IDs.
If guardduty_list_findings returns more than 2 IDs, you should call this tool max 5 times. 
Then, proceed with your analysis, but remember to notify the user that there may be additional findings not retrieved.
</IMPORTANT>

Returns:
  str: JSON-formatted details of the findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aws_regionYes
detector_idYes
finding_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that implements the core logic of the 'guardduty_get_findings' tool. It uses the boto3 GuardDuty client to fetch detailed findings for given detector_id and finding_ids, serializes the response to JSON, and handles errors.
    @mcp.tool()
    async def guardduty_get_findings(
        aws_region: str,
        detector_id: str,
        finding_ids: list
    ) -> str:
        """
        Get detailed information for the specified GuardDuty findings.
        
        Parameters:
          aws_region (str): The AWS region - use 'us-east-1' if not specified.
          detector_id (str): The GuardDuty detector ID.
          finding_ids (list): A list of finding IDs for which to retrieve details.
        
        <IMPORTANT>
        The server may crash when the response is too large. To avoid this, pass only max 2 finding IDs at a time. 
        The finding_ids list should contain a maximum of 2 IDs.
        If guardduty_list_findings returns more than 2 IDs, you should call this tool max 5 times. 
        Then, proceed with your analysis, but remember to notify the user that there may be additional findings not retrieved.
        </IMPORTANT>
    
        Returns:
          str: JSON-formatted details of the findings.
        """
        try:
            client = boto3.client('guardduty', region_name=aws_region)
            response = client.get_findings(
                DetectorId=detector_id,
                FindingIds=finding_ids
            )
            findings = response.get("Findings", [])
            # insert sleep of 3 seconds to avoid throttling
            #time.sleep(3)
            return json.dumps(findings, indent=2, cls=DateTimeEncoder)
        except Exception as e:
            return f"Error getting GuardDuty findings: {str(e)}"
  • Helper class for JSON encoding datetime objects to ISO format, used in the guardduty_get_findings tool to serialize response data containing timestamps.
    class DateTimeEncoder(json.JSONEncoder):
        def default(self, o):
            if isinstance(o, datetime.datetime):
                return o.isoformat()  # Convert datetime to ISO-format string.
            return super().default(o)
  • server.py:622-622 (registration)
    The @mcp.tool() decorator registers the guardduty_get_findings function as an MCP tool.
    @mcp.tool()
Behavior5/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 effectively describes critical behavioral traits: the tool may cause server crashes if too many IDs are passed (a risk), specifies a maximum batch size (2 IDs), provides workarounds for larger datasets (call up to 5 times), and mentions the need to notify users about potential data limitations. This goes beyond basic functionality to include operational constraints and error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized, with a clear purpose statement, parameter explanations, and a critical usage section. Every sentence adds value, but the <IMPORTANT> block is somewhat lengthy, though necessary for clarity. It's front-loaded with the core purpose, making it efficient for quick understanding.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters, no annotations, 0% schema coverage, but with an output schema), the description is highly complete. It covers the tool's purpose, parameter semantics, critical behavioral constraints, usage guidelines, and references to sibling tools. The output schema handles return value details, so the description doesn't need to explain the JSON format, making it fully adequate for the context.

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 meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'aws_region' with a default value suggestion, 'detector_id' as the GuardDuty detector ID, and 'finding_ids' as a list of IDs to retrieve details for. However, it doesn't fully specify the format or constraints of 'finding_ids' (e.g., ID structure), leaving some ambiguity, so it doesn't reach a perfect score.

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: 'Get detailed information for the specified GuardDuty findings.' It specifies the verb ('Get detailed information') and resource ('GuardDuty findings'), but doesn't explicitly differentiate it from sibling tools like 'guardduty_list_findings' or 'guardduty_get_finding_statistics', which is why it doesn't earn a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description provides explicit usage guidelines in the <IMPORTANT> section, including when to use this tool (after 'guardduty_list_findings' returns IDs), how to use it (max 2 IDs at a time, call up to 5 times), and what to do if there are more findings (notify the user). It also implicitly contrasts with sibling tools by referencing 'guardduty_list_findings'.

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