Skip to main content
Glama

Solve Sketch

solve_sketch
Read-only

Use this when you need to solve a 2D sketch constraint set. Solve a 2D sketch constraint set. Side-effect-free: pass { entities, constraints } and receive solved entities plus the original constraints. Entities are POINT, LINE, and CIRCLE records; constraints use the kernelCAD constraint vocabulary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entitiesYesSketch entities to solve. Lines reference point ids; circles reference a center point id.
constraintsYesConstraints to apply to the entities.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties
      Removed value: -{
      -  "constraints": {
      -    "description": "The constraints applied.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "converged": {
      -    "description": "Whether the constraint solve converged below tolerance. ok is false when this is false.",
      -    "type": "boolean"
      -  },
      -  "entities": {
      -    "description": "Solved sketch entities (best-effort on a non-converging solve).",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "errors": {
      -    "description": "Solver/validation errors (present on failure, including non-convergence).",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "ok": {
      -    "type": "boolean"
      -  },
      -  "residual": {
      -    "description": "Final aggregate constraint residual when the solver ran.",
      -    "type": "number"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok",
      -  "entities",
      -  "constraints"
      -]
  2. Changed4 schema fields changed
    • addedOutput schema / properties / converged
      Added value: +{
      +  "description": "Whether the constraint solve converged below tolerance. ok is false when this is false.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / entities / description
      Previous value: -"Solved sketch entities."New value: +"Solved sketch entities (best-effort on a non-converging solve)."
    • changedOutput schema / properties / errors / description
      Previous value: -"Solver errors (present on failure)."New value: +"Solver/validation errors (present on failure, including non-convergence)."
    • addedOutput schema / properties / residual
      Added value: +{
      +  "description": "Final aggregate constraint residual when the solver ran.",
      +  "type": "number"
      +}
  3. Changed4 schema fields changed
    • addedInput schema / properties / constraints / items / properties
      Added value: +{
      +  "entities": {
      +    "description": "Ids of the entities the constraint relates.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "id": {
      +    "type": "string"
      +  },
      +  "type": {
      +    "enum": [
      +      "COINCIDENT",
      +      "DISTANCE",
      +      "HORIZONTAL",
      +      "VERTICAL",
      +      "PARALLEL",
      +      "PERPENDICULAR",
      +      "EQUAL_LENGTH",
      +      "TANGENT",
      +      "RADIUS",
      +      "ANGLE",
      +      "CONCENTRIC",
      +      "SYMMETRIC"
      +    ],
      +    "type": "string"
      +  },
      +  "value": {
      +    "description": "Required for DISTANCE, RADIUS, and ANGLE.",
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / constraints / items / required
      Added value: +[
      +  "id",
      +  "type",
      +  "entities"
      +]
    • addedInput schema / properties / entities / items / oneOf
      Added value: +[
      +  {
      +    "description": "POINT — a 2D point.",
      +    "properties": {
      +      "fixed": {
      +        "description": "If true, the solver won't move this point.",
      +        "type": "boolean"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "POINT"
      +        ],
      +        "type": "string"
      +      },
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "type",
      +      "x",
      +      "y"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "LINE — references two point ids.",
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "p1": {
      +        "type": "string"
      +      },
      +      "p2": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "LINE"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "type",
      +      "p1",
      +      "p2"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "CIRCLE — references a center point id.",
      +    "properties": {
      +      "center": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "radius": {
      +        "type": "number"
      +      },
      +      "type": {
      +        "enum": [
      +          "CIRCLE"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "type",
      +      "center",
      +      "radius"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / entities / items / type
      Removed value: -"object"
  4. Changed4 schema fields changed
    • removedInput schema / properties / constraints / items / properties
      Removed value: -{
      -  "entities": {
      -    "description": "Ids of the entities the constraint relates.",
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  "id": {
      -    "type": "string"
      -  },
      -  "type": {
      -    "enum": [
      -      "COINCIDENT",
      -      "DISTANCE",
      -      "HORIZONTAL",
      -      "VERTICAL",
      -      "PARALLEL",
      -      "PERPENDICULAR",
      -      "EQUAL_LENGTH",
      -      "TANGENT",
      -      "RADIUS",
      -      "ANGLE",
      -      "CONCENTRIC",
      -      "SYMMETRIC"
      -    ],
      -    "type": "string"
      -  },
      -  "value": {
      -    "description": "Required for DISTANCE, RADIUS, and ANGLE.",
      -    "type": "number"
      -  }
      -}
    • removedInput schema / properties / constraints / items / required
      Removed value: -[
      -  "id",
      -  "type",
      -  "entities"
      -]
    • removedInput schema / properties / entities / items / oneOf
      Removed value: -[
      -  {
      -    "description": "POINT — a 2D point.",
      -    "properties": {
      -      "fixed": {
      -        "description": "If true, the solver won't move this point.",
      -        "type": "boolean"
      -      },
      -      "id": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "enum": [
      -          "POINT"
      -        ],
      -        "type": "string"
      -      },
      -      "x": {
      -        "type": "number"
      -      },
      -      "y": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "type",
      -      "x",
      -      "y"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "LINE — references two point ids.",
      -    "properties": {
      -      "id": {
      -        "type": "string"
      -      },
      -      "p1": {
      -        "type": "string"
      -      },
      -      "p2": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "enum": [
      -          "LINE"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "type",
      -      "p1",
      -      "p2"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "description": "CIRCLE — references a center point id.",
      -    "properties": {
      -      "center": {
      -        "type": "string"
      -      },
      -      "id": {
      -        "type": "string"
      -      },
      -      "radius": {
      -        "type": "number"
      -      },
      -      "type": {
      -        "enum": [
      -          "CIRCLE"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "type",
      -      "center",
      -      "radius"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / entities / items / type
      Added value: +"object"
  5. Changed4 schema fields changed
    • addedInput schema / properties / constraints / items / properties
      Added value: +{
      +  "entities": {
      +    "description": "Ids of the entities the constraint relates.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "id": {
      +    "type": "string"
      +  },
      +  "type": {
      +    "enum": [
      +      "COINCIDENT",
      +      "DISTANCE",
      +      "HORIZONTAL",
      +      "VERTICAL",
      +      "PARALLEL",
      +      "PERPENDICULAR",
      +      "EQUAL_LENGTH",
      +      "TANGENT",
      +      "RADIUS",
      +      "ANGLE",
      +      "CONCENTRIC",
      +      "SYMMETRIC"
      +    ],
      +    "type": "string"
      +  },
      +  "value": {
      +    "description": "Required for DISTANCE, RADIUS, and ANGLE.",
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / constraints / items / required
      Added value: +[
      +  "id",
      +  "type",
      +  "entities"
      +]
    • addedInput schema / properties / entities / items / oneOf
      Added value: +[
      +  {
      +    "description": "POINT — a 2D point.",
      +    "properties": {
      +      "fixed": {
      +        "description": "If true, the solver won't move this point.",
      +        "type": "boolean"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "POINT"
      +        ],
      +        "type": "string"
      +      },
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "type",
      +      "x",
      +      "y"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "LINE — references two point ids.",
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "p1": {
      +        "type": "string"
      +      },
      +      "p2": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "LINE"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "type",
      +      "p1",
      +      "p2"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "description": "CIRCLE — references a center point id.",
      +    "properties": {
      +      "center": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "string"
      +      },
      +      "radius": {
      +        "type": "number"
      +      },
      +      "type": {
      +        "enum": [
      +          "CIRCLE"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "type",
      +      "center",
      +      "radius"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / entities / items / type
      Removed value: -"object"
  6. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "constraints": {
      +      "description": "The constraints applied.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "entities": {
      +      "description": "Solved sketch entities.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "errors": {
      +      "description": "Solver errors (present on failure).",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "entities",
      +    "constraints"
      +  ],
      +  "type": "object"
      +}
  7. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.