Skip to main content
Glama

list_guardduty_findings

Retrieve recent high-severity AWS GuardDuty security findings to monitor and respond to potential threats in your cloud environment.

Instructions

Lists recent high-severity GuardDuty findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
severityNoMinimum severity level (default: 4).
limitNoNumber of findings to return (default: 10).

Implementation Reference

  • The handler function that implements the core logic for the 'list_guardduty_findings' tool. It retrieves the GuardDuty detector ID, lists findings filtered by minimum severity, fetches detailed findings, and returns a summarized list including title, severity, type, region, and resource ID.
    if (name === "list_guardduty_findings") {
        // first list detectors
        const detectorsCmd = new ListDetectorsCommand({});
        const dResponse = await guardDutyClient.send(detectorsCmd);
        const detectorId = dResponse.DetectorIds?.[0];
    
        if (!detectorId) {
            return { content: [{ type: "text", text: "No GuardDuty detector found." }] };
        }
    
        const severity = (args as any)?.severity || 4;
        const limit = (args as any)?.limit || 10;
    
        const listCmd = new ListFindingsCommand({
            DetectorId: detectorId,
            FindingCriteria: { Criterion: { severity: { Gte: severity } } },
            MaxResults: limit
        });
        const listResponse = await guardDutyClient.send(listCmd);
    
        if (!listResponse.FindingIds || listResponse.FindingIds.length === 0) {
            return { content: [{ type: "text", text: "No findings found." }] };
        }
    
        const getCmd = new GetFindingsCommand({
            DetectorId: detectorId,
            FindingIds: listResponse.FindingIds
        });
        const getResponse = await guardDutyClient.send(getCmd);
    
        const findings = getResponse.Findings?.map(f => ({
            Title: f.Title,
            Severity: f.Severity,
            Type: f.Type,
            Region: f.Region,
            ResourceId: f.Resource?.InstanceDetails?.InstanceId || "N/A"
        })) || [];
    
        return {
            content: [{ type: "text", text: JSON.stringify(findings, null, 2) }]
        };
    }
  • src/index.ts:448-463 (registration)
    Registration of the 'list_guardduty_findings' tool in the ListToolsRequest handler, including its name, description, and input schema definition.
        name: "list_guardduty_findings",
        description: "Lists recent high-severity GuardDuty findings.",
        inputSchema: {
            type: "object",
            properties: {
                severity: {
                    type: "number",
                    description: "Minimum severity level (default: 4)."
                },
                limit: {
                    type: "number",
                    description: "Number of findings to return (default: 10)."
                }
            }
        }
    },
  • Input schema defining optional parameters 'severity' (minimum severity level, default 4) and 'limit' (max findings to return, default 10) for the tool.
    inputSchema: {
        type: "object",
        properties: {
            severity: {
                type: "number",
                description: "Minimum severity level (default: 4)."
            },
            limit: {
                type: "number",
                description: "Number of findings to return (default: 10)."
            }
        }
    }
  • Initialization of the GuardDutyClient instance used throughout the tool handler.
    const guardDutyClient = new GuardDutyClient({});
  • Import of AWS SDK GuardDuty client and commands required for the tool implementation.
    import { GuardDutyClient, ListFindingsCommand, GetFindingsCommand, ListDetectorsCommand } from "@aws-sdk/client-guardduty";
Behavior2/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 mentions 'recent' and 'high-severity' but lacks details on what 'recent' means (e.g., last 24 hours), whether results are paginated, authentication requirements, rate limits, or error handling. This is inadequate for a tool that likely interacts with AWS services.

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 a single, efficient sentence that front-loads key information ('Lists recent high-severity GuardDuty findings'). It avoids redundancy but could be slightly more informative without losing conciseness, such as by specifying a default timeframe.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain return values (e.g., format of findings), error conditions, or behavioral nuances like pagination or AWS region dependencies. Given the complexity of security findings, more context is needed for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters with defaults. The description adds minimal value by implying 'high-severity' relates to the 'severity' parameter, but doesn't explain severity scales (e.g., 1-10) or clarify 'recent' beyond the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 action ('Lists') and resource ('GuardDuty findings') with a specific scope ('recent high-severity'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_security_groups' or 'list_open_security_groups' that might also relate to security findings, leaving room for ambiguity in a crowded toolset.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description mentions 'recent high-severity' but doesn't specify timeframes, compare to other listing tools, or indicate prerequisites like required AWS permissions, leaving the agent to infer usage context.

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/bhaveshopss/MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server