Skip to main content
Glama
znk-mcp

znk-mcp

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

NameRequiredDescriptionDefault
batchNobatch form; returns 9002 on the official CLI
requestYessingle-constraint or solve_system request object

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does substantial work: it discloses the success payload {ok,residual,iterations,converged,positions}, the failure shape {ok:false,error:{code,message}}, and the non-obvious kernel 9002 batch behavior. It does not say whether solving mutates or persists anything, nor whether iteration limits or options affect convergence, so a small gap remains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the purpose before the contract details, and every sentence carries information about inputs, modes, or returns. The middle sentence is a dense run-on that packs three JSON shapes together, which costs readability without adding waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nested-object tool with no output schema and no annotations, the description supplies the request grammar, the two mode families, the batch caveat, and both return shapes, which is most of what an agent needs. It omits side-effect and idempotency information for a solver that takes mutable option objects, leaving a modest hole.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description earns more by unpacking the opaque request object: the legacy single-constraint contract with fields {type,a_pos,a_dir,b_pos,b_dir,value} and the solve_system form with entities, constraints, and options. That meaning is entirely absent from the schema, which only says 'single-constraint or solve_system request object' with additionalProperties true. The batch flag is likewise re-explained with its 9002 consequence.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb, resource, and method: 'Solve 2D sketch constraints with the ZNKernel-II LM solver.' That is far more than a restatement of the name, and it is unmistakable against siblings like znk_boolean or znk_topology. It stops short of explicitly stating what it is not or naming an alternative, so it does not reach 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly routes the caller among three input forms (single constraint, solve_system, batch), which is useful mode-selection guidance. However, it never states when to choose this tool over another, nor any precondition or exclusion, and the batch guidance ('returns kernel 9002 on the official CLI and is passed through') is a warning rather than a use criterion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.