get_scanner_output
Retrieve scanner output for a specific issue occurrence using issue_id and occurrence_id to analyze detailed results on the intruder-mcp server.
Instructions
Get scanner output for a specific occurrence of an issue.
Args:
issue_id: The ID of the issue
occurrence_id: The ID of the occurrence
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | ||
| occurrence_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"issue_id": {
"title": "Issue Id",
"type": "integer"
},
"occurrence_id": {
"title": "Occurrence Id",
"type": "integer"
}
},
"required": [
"issue_id",
"occurrence_id"
],
"title": "get_scanner_outputArguments",
"type": "object"
}
Implementation Reference
- intruder_mcp/server.py:123-142 (handler)The main handler function decorated with @mcp.tool() that implements the logic for the get_scanner_output tool. It fetches all scanner outputs via the API client, formats them with plugin names, CVEs, and output lines, and returns a newline-separated string.@mcp.tool() async def get_scanner_output(issue_id: int, occurrence_id: int) -> str: """ Get scanner output for a specific occurrence of an issue. Args: issue_id: The ID of the issue occurrence_id: The ID of the occurrence """ outputs = api.get_scanner_output_all(issue_id=issue_id, occurrence_id=occurrence_id) formatted = [] for output in outputs: plugin_info = f"Plugin: {output.plugin.name}" if output.plugin.cve: plugin_info += f" (CVEs: {', '.join(output.plugin.cve)})" formatted.append(plugin_info) formatted.append("Output:") formatted.extend(str(line) for line in output.scanner_output) formatted.append("") return "\n".join(formatted)
- intruder_mcp/api_client.py:100-108 (helper)Supporting generator function in the IntruderAPI client that fetches all scanner outputs by paginating through the API endpoints with limit=100.def get_scanner_output_all(self, issue_id: int, occurrence_id: int) -> Generator[ScannerOutputList, None, None]: offset = 0 while True: response = self.get_scanner_output(issue_id, occurrence_id, limit=100, offset=offset) for output in response.results: yield output if not response.next: break offset += len(response.results)
- intruder_mcp/api_client.py:91-98 (helper)Low-level paginated API call in the IntruderAPI client to retrieve scanner output from the Intruder API server.def get_scanner_output(self, issue_id: int, occurrence_id: int, limit: Optional[int] = None, offset: Optional[int] = None) -> PaginatedScannerOutputListList: params = {} if limit: params["limit"] = limit if offset: params["offset"] = offset return PaginatedScannerOutputListList(**self.client.get(f"{self.base_url}/issues/{issue_id}/occurrences/{occurrence_id}/scanner_output/", params=params).json())