compliance_scan
What it does
Scores a content item against an embedded rule library covering Meta Ads, TikTok, YouTube and LinkedIn. Returns per-platform compatibility, an overall risk bucket, a safe_for_ads boolean, and a list of cited violations.
Every violation references a stable rule key (e.g. meta.body.scale_closeup) so you can act on the output programmatically rather than parsing prose.
Input schema
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | required | — |
Content id. |
| platforms | array<string> | optional | all 4 |
Subset of meta, tiktok, youtube, linkedin. |
Example call
json{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "compliance_scan", "arguments": { "id": "c_abc123", "platforms": ["meta", "tiktok"] } } }
Response shape
json{ "content_id": "c_abc123", "upload_id": "u_xyz789", "scanned_at": 1716301234, "model": "claude-sonnet-4-6", "overall_risk": "high", "safe_for_ads": false, "platform_compatibility": { "meta": "warn", "tiktok": "ok", "youtube": "skipped", "linkedin": "skipped" }, "violations": [ { "rule": "meta.brand.third_party_logo", "platform": "meta", "category": "brand_visibility", "frame_timestamp_estimate": "0:08", "severity": "high", "suggestion": "Blur the La Marzocco logo visible at 0:08.", "rule_text": "Third-party brand logos visible — must be blurred." } ], "recommendations": [ "Re-render with logo blur before Meta upload." ], "notes": "Espresso tutorial with prominent brand placement.", "evidence": { "delivery_url": "https://lumiqa.io/api/deliver/..." }, "limitations": [ "Frame extraction is not available inside Cloudflare Workers..." ] }
Usage from Claude Desktop
prompt"Is c_abc123 safe to run as a Meta ad? If not, list every violation with the rule key."
Usage from Python
pythonimport requests LUMIQA = "https://lumiqa.io/mcp/your-slug" HEADERS = {"Authorization": "Bearer lk_live_xxxxxxxxxxxx"} r = requests.post(LUMIQA, headers=HEADERS, json={ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "compliance_scan", "arguments": {"id": "c_abc123", "platforms": ["meta"]} }, }) print(r.json())
Usage from Node
javascriptconst r = await fetch("https://lumiqa.io/mcp/your-slug", { method: "POST", headers: { "Authorization": "Bearer lk_live_xxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name: "compliance_scan", arguments: { id: "c_abc123", platforms: ["meta"] }, }, }), }); const data = await r.json(); console.log(data);
Required env vars / integrations
- Pages secret
ANTHROPIC_API_KEY. - Optional
USE_PREMIUM_COMPLIANCE=trueto switch to Opus for the audit pass. - R2 binding
UPLOADS+MCP_DELIVERY_SECRET.
Known limitations
- Frame-level scoring is heuristic today. Workers can't run FFmpeg, so purely visual rules are inferred from metadata + the signed URL handed to the model. Output is honest about this in
limitations. - Violations whose
rulekey isn't in the policy library are dropped — the model can't invent constraints. - Severity ladder:
low < medium < high < block.safe_for_adsis false as soon as any high or block is present.