spiderfoot_start_scan
Launch a new OSINT reconnaissance scan against a target to gather intelligence, investigate threats, or perform footprinting using SpiderFoot modules.
Instructions
Start a new scan against a target.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scanname | Yes | ||
| scantarget | Yes | ||
| modulelist | No | ||
| typelist | No | ||
| usecase | No |
Implementation Reference
- src/index.ts:15-21 (schema)Zod input schema (StartScanSchema) for the spiderfoot_start_scan tool, defining parameters: scanname, scantarget (required), modulelist, typelist, usecase (optional). Used in both server registrations.const StartScanSchema = z.object({ scanname: z.string().min(1), scantarget: z.string().min(1), modulelist: z.string().optional(), typelist: z.string().optional(), usecase: z.enum(['all', 'investigate', 'passive', 'footprint']).optional(), });
- src/index.ts:70-81 (registration)Registration of spiderfoot_start_scan MCP tool in stdio server (index.ts), includes input schema reference, inline handler logic (env check + sf.startScan call), and output formatting.'spiderfoot_start_scan', { title: 'Start Scan', description: 'Start a new scan against a target.', inputSchema: StartScanSchema.shape }, async (input) => { const allow = (process.env.ALLOW_START_SCAN ?? 'true').toLowerCase(); if (!(allow === 'true' || allow === '1' || allow === 'yes')) { return { content: [{ type: 'text', text: 'Starting scans is disabled by configuration (ALLOW_START_SCAN=false).' }], isError: true }; } const res = await sf.startScan(input as any); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; } );
- src/index-http.ts:53-64 (registration)Registration of spiderfoot_start_scan MCP tool in HTTP server (index-http.ts), identical to stdio version: schema ref, inline handler with env check and sf.startScan delegation.server.registerTool( 'spiderfoot_start_scan', { title: 'Start Scan', description: 'Start a new scan against a target.', inputSchema: StartScanSchema.shape }, async (input) => { const allow = (process.env.ALLOW_START_SCAN ?? 'true').toLowerCase(); if (!(allow === 'true' || allow === '1' || allow === 'yes')) { return { content: [{ type: 'text', text: 'Starting scans is disabled by configuration (ALLOW_START_SCAN=false).' }], isError: true }; } const res = await sf.startScan(input as any); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; } );
- src/spiderfootClient.ts:49-58 (helper)Core helper implementation: startScan method in SpiderfootClient HTTP wrapper. Performs POST /startscan to underlying Spiderfoot server with provided args and returns response.async startScan(args: { scanname: string; scantarget: string; modulelist?: string; // comma separated module names typelist?: string; // comma separated event types usecase?: string; // all|investigate|passive|footprint }) { const { data } = await this.http.post('/startscan', args); return data; }