znk_sketch_solve
Solves 2D sketch constraints with the ZNKernel-II LM solver, accepting single-constraint or system requests and returning convergence status, residuals, iterations, and solved positions.
Instructions
Solve 2D sketch constraints with the ZNKernel-II LM solver. request is the legacy JSON contract: single constraint {type,a_pos,a_dir,b_pos,b_dir,value} or system {op:"solve_system",entities:[...],constraints:[...],options:{...}}. Batch mode ({constraints:[...]} or batch=true) returns kernel 9002 on the official CLI and is passed through. Returns {ok,residual,iterations,converged,positions} or {ok:false,error:{code,message}}.
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": {
"request": "<request>"
},
"name": "znk_sketch_solve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch | No | batch form; returns 9002 on the official CLI | |
| request | Yes | single-constraint or solve_system request object |