Scan a single code snippet
scan_snippetExecute static security checks on an in-memory code string to identify vulnerabilities in AI-generated Supabase or Next.js code before sharing or committing.
Instructions
Runs the static engine on one in-memory string as if it were a file. Use this after generating code, before showing it to the user or committing it. Cheaper than scan_path when only a diff is at stake.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"content": "<content>"
},
"name": "scan_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path this snippet would live at, e.g. src/api/orders.ts. Used to make client-side heuristics work (files under public/, src/components/, *.tsx, etc. are treated as shipped to the browser). | |
| content | Yes | The full source text of the file/snippet. |