spiderfoot_scan_data
Retrieve specific scan results by scan ID to analyze reconnaissance data collected during OSINT investigations.
Instructions
Fetch scan event results for a scan ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| eventType | No | ||
| id | Yes |
Implementation Reference
- src/spiderfootClient.ts:60-66 (handler)Implements the core logic for the spiderfoot_scan_data tool by making an HTTP POST request to the Spiderfoot server's /scaneventresults endpoint with scan ID and optional eventType.async scanEventResults(args: { id: string; eventType?: string }) { const { data } = await this.http.post('/scaneventresults', { id: args.id, eventType: args.eventType ?? 'ALL', }); return data; }
- src/index.ts:82-86 (registration)Registers the spiderfoot_scan_data tool with the MCP server in the stdio transport version, including input schema and thin wrapper handler.server.registerTool( 'spiderfoot_scan_data', { title: 'Scan Data', description: 'Fetch scan event results for a scan ID.', inputSchema: { id: z.string(), eventType: z.string().optional() } }, async ({ id, eventType }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.scanEventResults({ id, eventType })) }] }) );
- src/index-http.ts:66-70 (registration)Registers the spiderfoot_scan_data tool with the MCP server in the HTTP transport version, including input schema and thin wrapper handler.server.registerTool( 'spiderfoot_scan_data', { title: 'Scan Data', description: 'Fetch scan event results for a scan ID.', inputSchema: { id: z.string(), eventType: z.string().optional() } }, async ({ id, eventType }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.scanEventResults({ id, eventType })) }] }) );
- src/index.ts:23-26 (schema)Zod schema matching the input schema for spiderfoot_scan_data tool (id required, eventType optional).const ScanDataSchema = z.object({ id: z.string().min(1), eventType: z.string().optional(), });
- src/spiderfootClient.ts:92-98 (helper)Factory function to create the SpiderfootClient instance from environment variables, used in tool handlers.export function makeSpiderfootClientFromEnv() { const baseUrl = process.env.SPIDERFOOT_BASE_URL || 'http://127.0.0.1:5001'; const username = process.env.SPIDERFOOT_USER; const password = process.env.SPIDERFOOT_PASS; return new SpiderfootClient({ baseUrl, username, password }); }