Skip to main content
Glama
intruder-io

intruder-mcp

Official

get_scan

Retrieve detailed results and status for a specific Intruder.IO security scan by providing its scan ID.

Instructions

    Get details of a specific scan.

    Args:
        scan_id: The ID of the scan to get
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scan_idYes

Implementation Reference

  • The @mcp.tool()-decorated handler function for 'get_scan'. It retrieves scan details from the IntruderAPI and formats them into a human-readable string.
    @mcp.tool()
    async def get_scan(scan_id: int) -> str:
        """
        Get details of a specific scan.
    
        Args:
            scan_id: The ID of the scan to get
        """
        scan = api.get_scan(scan_id)
        details = [
            f"Scan {scan.id} ({scan.scan_type})",
            f"Status: {scan.status}",
            f"Schedule: {scan.schedule_period}",
            f"Created: {scan.created_at}",
            f"Type: {scan.scan_type}"
        ]
        if scan.start_time:
            details.append(f"Started: {scan.start_time}")
        if scan.completed_time:
            details.append(f"Completed: {scan.completed_time}")
        if scan.target_addresses:
            details.append("\nTargets:")
            details.extend(f"- {addr}" for addr in scan.target_addresses)
    
        return "\n".join(details)
  • Helper method in IntruderAPI client that fetches the scan data via HTTP GET request to the Intruder API.
    def get_scan(self, scan_id: int) -> Scan:
        return Scan(**self.client.get(f"{self.base_url}/scans/{scan_id}/").json())
  • Pydantic BaseModel defining the structure of the Scan object used by get_scan.
    class Scan(BaseModel):
        id: int
        status: ScanStatusField
        created_at: datetime
        target_addresses: Optional[List[str]] = None
        scan_type: ScanTypeEnum
        schedule_period: SchedulePeriodEnum
        start_time: Optional[datetime] = None
        completed_time: Optional[datetime] = None
  • The @mcp.tool() decorator registers the get_scan function as an MCP tool.
    @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/intruder-io/intruder-mcp'

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