check_code
Validate Python source or markdown for calls to nonexistent library APIs, including hallucinated functions, methods, modules, imports, and keyword arguments before presenting or running the code.
Instructions
Check Python code for calls to library APIs that don't exist (hallucinated functions, methods, modules, imports and standard library keyword arguments). Covers the Python standard library (checked against the running interpreter) and NumPy, pandas, Matplotlib, PyTorch, scikit-learn and SciPy (checked against their documentation inventories). Accepts plain Python or markdown with code blocks. Use it on code you wrote before presenting or running it.
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": "check_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python source or markdown with ```python blocks |