Skip to main content
Glama

solve_sketch

Read-only

Convert a 2D sketch of stated relationships into solved coordinates and OpenSCAD geometry, optionally extruded, for design checking and printing.

Instructions

Turn a 2D sketch of stated relationships into solved coordinates and OpenSCAD.

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": {
      "sketch": "<sketch>"
    },
    "name": "solve_sketch"
  }
}

Input Schema

NameRequiredDescriptionDefault
sketchYesThe sketch as JSON text: ``{"entities": [...], "constraints": [...]}`` with an optional ``name`` (at most 200 entities, 400 constraints, 256 KB). Each entity has an ``id`` and ``type`` (``point`` x, y; ``line`` a, b; ``circle`` c, r; ``arc`` c, a, b); each constraint an ``id``, ``type``, ``refs`` and, where the type takes one, a ``value``, in the shapes the tool description lays out.
extrude_heightNoHow far to extrude the solved outline, in millimetres (0 or more). ``0`` (the default) leaves the emission 2D, with no faces. Default: 0.0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.1
    • changedInput schema / properties / extrude_height / description
      Previous value: -"Default: 0.0."New value: +"How far to extrude the solved outline, in millimetres (0 or more).  ``0`` (the default) leaves the emission 2D, with no faces. Default: 0.0."
    • addedInput schema / properties / sketch / description
      Added value: +"The sketch as JSON text: ``{\"entities\": [...], \"constraints\": [...]}`` with an optional ``name`` (at most 200 entities, 400 constraints, 256 KB).  Each entity has an ``id`` and ``type`` (``point`` x, y; ``line`` a, b; ``circle`` c, r; ``arc`` c, a, b); each constraint an ``id``, ``type``, ``refs`` and, where the type takes one, a ``value``, in the shapes the tool description lays out."
  2. Addedv1.5.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already establish that this is a non-destructive, read-only, non-open-world operation. The description adds that the tool solves stated relationships and emits OpenSCAD, but it does not disclose error behavior, output format details, or whether solving can fail on over-constrained sketches.

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

Conciseness5/5

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

The description is a single front-loaded sentence with no redundant wording. Every part contributes to the core purpose, and there is no unnecessary preamble.

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

Completeness3/5

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

For a two-parameter tool with annotations and full schema coverage, the description is minimally adequate. However, the sketch schema defers constraint shapes to the tool description, and the description never lays those shapes out; it also does not describe the return format despite there being no output schema.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents both parameters in detail. The description itself adds no parameter-specific meaning beyond saying the input is a 2D sketch and the output includes OpenSCAD, which is the baseline for high schema coverage.

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 description states a specific verb-resource-output relationship: turn a 2D sketch with stated relationships into solved coordinates and OpenSCAD. This is clear enough for an agent to understand the tool's role, though it does not explicitly distinguish itself from related siblings such as solve_template_constraints or compile_scad.

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 implies usage when an agent has a constrained 2D sketch that needs solving, but it provides no explicit when-to-use, when-not-to-use, or alternative-tool guidance. The intended context is inferable, but not spelled out.

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

Deploy Server

Other Tools