spiderfoot_scan_logs
Retrieve scan execution logs for a SpiderFoot OSINT reconnaissance scan to monitor progress and review detailed activity records.
Instructions
Fetch/poll scan logs for a given scan ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| limit | No | ||
| reverse | No | ||
| rowId | No |
Implementation Reference
- src/index.ts:94-98 (registration)Registration of the spiderfoot_scan_logs tool in the stdio MCP server, including input schema validation and inline handler that JSON.stringifies the result of sf.scanLogs.server.registerTool( 'spiderfoot_scan_logs', { title: 'Scan Logs', description: 'Fetch/poll scan logs for a given scan ID.', inputSchema: { id: z.string(), limit: z.number().optional(), reverse: z.enum(['0','1']).optional(), rowId: z.number().optional() } }, async ({ id, limit, reverse, rowId }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.scanLogs({ id, limit, reverse, rowId })) }] }) );
- src/index-http.ts:78-82 (registration)Registration of the spiderfoot_scan_logs tool in the HTTP MCP server (within buildServer), identical to stdio version.server.registerTool( 'spiderfoot_scan_logs', { title: 'Scan Logs', description: 'Fetch/poll scan logs for a given scan ID.', inputSchema: { id: z.string(), limit: z.number().optional(), reverse: z.enum(['0','1']).optional(), rowId: z.number().optional() } }, async ({ id, limit, reverse, rowId }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.scanLogs({ id, limit, reverse, rowId })) }] }) );
- src/spiderfootClient.ts:76-84 (handler)Primary handler logic: HTTP POST request to SpiderFoot server's /scanlog endpoint with provided parameters, returning the raw response data.async scanLogs(args: { id: string; limit?: number; reverse?: '0' | '1'; rowId?: number }) { const { data } = await this.http.post('/scanlog', { id: args.id, limit: args.limit, reverse: args.reverse, rowId: args.rowId, }); return data; }
- src/index.ts:28-33 (schema)Zod schema definition for scan logs input parameters (defined but not directly used in registration; inline schema used instead).const ScanLogsSchema = z.object({ id: z.string().min(1), limit: z.number().int().positive().optional(), reverse: z.enum(['0', '1']).optional(), rowId: z.number().int().nonnegative().optional(), });
- src/spiderfootClient.ts:92-97 (helper)Factory function to create SpiderfootClient instance from environment variables, used to instantiate 'sf' in both servers.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 }); }