list_protocols
Retrieve all available protocols for conducting Internet scans using Shodan API, enabling effective cybersecurity research and threat intelligence gathering.
Instructions
List all protocols that can be used when performing on-demand Internet scans
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1634-1652 (handler)MCP tool handler for 'list_protocols': calls shodanClient.listProtocols() and formats response as JSON text.case "list_protocols": { try { const protocols = await shodanClient.listProtocols(); return { content: [{ type: "text", text: JSON.stringify(protocols, null, 2) }] }; } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Error listing protocols: ${(error as Error).message}` ); } }
- src/index.ts:438-451 (helper)ShodanClient helper method that performs API call to /shodan/protocols endpoint to retrieve list of protocols.async listProtocols(): Promise<any> { try { const response = await this.axiosInstance.get("/shodan/protocols"); return { protocols: response.data }; } catch (error: unknown) { if (axios.isAxiosError(error)) { throw new McpError( ErrorCode.InternalError, `Shodan API error: ${error.response?.data?.error || error.message}` ); } throw error; } }
- src/index.ts:1064-1070 (registration)Tool registration entry in ListToolsRequestSchema handler, including name, description, and empty input schema.name: "list_protocols", description: "List all protocols that can be used when performing on-demand Internet scans", inputSchema: { type: "object", properties: {} } },
- src/index.ts:1064-1070 (schema)Input schema definition for list_protocols tool: no required parameters.name: "list_protocols", description: "List all protocols that can be used when performing on-demand Internet scans", inputSchema: { type: "object", properties: {} } },