get_vulnerable_urls
Retrieve vulnerable URLs from a prior batch scan by specifying its batch ID, returning detailed results for SQL injection vulnerabilities.
Instructions
Get only the vulnerable URLs from a batch scan.
Args: batch_id: Batch ID from a previous batch scan
Returns: List of vulnerable URLs with their scan details
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch_id | Yes |
Implementation Reference
- src/sqli_mcp/server.py:810-832 (handler)The @mcp.tool() decorated function that implements the 'get_vulnerable_urls' tool. It filters batch scan results to return only URLs flagged as vulnerable.
@mcp.tool() def get_vulnerable_urls(batch_id: str) -> dict: """ Get only the vulnerable URLs from a batch scan. Args: batch_id: Batch ID from a previous batch scan Returns: List of vulnerable URLs with their scan details """ if batch_id not in batch_results: return {"error": f"Batch ID {batch_id} not found"} batch = batch_results[batch_id] vulnerable = [r for r in batch["results"] if r.get("vulnerable", False)] return { "batch_id": batch_id, "total_scanned": batch["total_urls"], "vulnerable_count": len(vulnerable), "vulnerable_urls": vulnerable } - src/sqli_mcp/server.py:810-811 (registration)The @mcp.tool() decorator registers 'get_vulnerable_urls' as an MCP tool on the FastMCP server instance.
@mcp.tool() def get_vulnerable_urls(batch_id: str) -> dict: - src/sqli_mcp/server.py:482-482 (helper)The 'batch_results' dictionary that stores batch scan results and is used by get_vulnerable_urls to retrieve and filter results.
batch_results: dict[str, dict] = {}