validate_tool_code
Check Python tool code for syntax errors and banned patterns to validate it before saving.
Instructions
Check Python tool code for syntax errors and banned patterns before saving it on a tool. Returns valid plus errors (line, column, message, severity, functionName). Stateless and safe for read-only service tokens.
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": {
"functions": "<functions>"
},
"name": "validate_tool_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| classes | No | Optional classes to check (max 20). | |
| imports | No | The import block, as one string. Defaults to empty. | |
| functions | Yes | The functions to check (max 20). |