verify_snippet
Verify code against installed packages to catch hallucinations. Checks that imports and API calls exist, flagging missing packages and invalid attributes.
Instructions
Verify code against the ACTUALLY-INSTALLED packages to catch hallucinations.
Call this after generating code to check that the imports and API calls it uses really exist in this environment. Flags: imported packages that aren't installed (with typo/slopsquat suggestions) and attributes/methods that can't be found on installed modules/classes. Static analysis only — treat 'medium' findings as "verify", not "definitely wrong".
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": {
"code": "<code>"
},
"name": "verify_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| language | No | python |