Check JavaScript without writing it
validate_blocksParse block code and code files to report syntax errors and diagnostics without writing to a workspace, so you can catch typos before a rejected write.
Instructions
Parses block code and code files and reports syntax errors WITHOUT touching any workspace — no workspaceId, nothing written, nothing to undo if it fails. Use it freely while drafting or fixing a block instead of discovering a typo from a rejected write. Returns { valid, checkedBlocks, checkedFiles, diagnostics[] } with the line and column of each problem. Note import "utils.js"; / import "zod@4.4.3"; lines are valid and are NOT errors.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "validate_blocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Code files to parse. Only .js files are parsed. | |
| blocks | No | Blocks to parse. A block with no `type` is treated as Process. |