scan_file
Submit a file download URL for malware analysis across 70+ antivirus engines. Returns an analysis ID to poll for verdict: malicious, suspicious, clean, or timeout.
Instructions
Submit a file for binary malware analysis across 70+ AV engines. Provide a publicly accessible download URL — RelayShield handles the download. Returns an analysis_id immediately (async). Call check_scan_result with the analysis_id every 5 seconds until verdict is returned. Verdicts: malicious | suspicious | clean | timeout. Use when a user receives an email attachment and forwards the download link. Requires subscription API key — coming soon for pay-as-you-go. Subscription: rapidapi.com/relayshield
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | Publicly accessible URL to download the file from | |
| filename | No | Optional filename hint (e.g. invoice_march.pdf) |
Implementation Reference
- src/relayshield_mcp/server.py:183-210 (registration)Tool registration for scan_file inside list_tools(). Defines name, description, and inputSchema (required file_url, optional filename).
types.Tool( name="scan_file", description=( "Submit a file for binary malware analysis across 70+ AV engines. " "Provide a publicly accessible download URL — RelayShield handles the download. " "Returns an analysis_id immediately (async). " "Call check_scan_result with the analysis_id every 5 seconds until verdict is returned. " "Verdicts: malicious | suspicious | clean | timeout. " "Use when a user receives an email attachment and forwards the download link. " "Requires subscription API key — coming soon for pay-as-you-go. " "Subscription: rapidapi.com/relayshield" ), inputSchema={ "type": "object", "required": ["file_url"], "properties": { "file_url": { "type": "string", "format": "uri", "description": "Publicly accessible URL to download the file from", }, "filename": { "type": "string", "description": "Optional filename hint (e.g. invoice_march.pdf)", }, }, }, ), - Input schema for scan_file: requires 'file_url' (uri format) with optional 'filename' (string).
inputSchema={ "type": "object", "required": ["file_url"], "properties": { "file_url": { "type": "string", "format": "uri", "description": "Publicly accessible URL to download the file from", }, "filename": { "type": "string", "description": "Optional filename hint (e.g. invoice_march.pdf)", }, }, }, - src/relayshield_mcp/server.py:331-339 (handler)Handler for scan_file inside _dispatch(). Builds POST body with file_url and optional filename, sends to /v1/scan-file or /v1/payg/scan-file endpoint.
if name == "scan_file": body: dict = {"file_url": arguments["file_url"]} if "filename" in arguments: body["filename"] = arguments["filename"] return await client.post( f"{base}/scan-file", headers=headers, json=body, ) - Guard that returns 'coming_soon' for scan_file (and scan_url) if no API_KEY is set — VT commercial licensing pending for PAYG.
if not API_KEY and name in VT_COMING_SOON: return [types.TextContent(type="text", text=json.dumps({ "ok": False, "tool": name, "status": "coming_soon", "message": ( f"{name} requires a subscription API key. " "VT commercial licensing is pending for pay-as-you-go access. " "Subscribe at rapidapi.com/relayshield for early access." ), }))] - src/relayshield_mcp/server.py:52-52 (registration)PAYG_PRICING entry showing scan_file as 'coming soon'.
"scan_file": "coming soon",