Skip to main content
Glama

Solve Sketch

solve_sketch
Read-onlyIdempotent

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

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

Output 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

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the description doesn't need to re-argue safety. It nevertheless adds real context beyond them: the pass-and-receive contract ('receive solved entities plus the original constraints') and the fact that constraints follow the kernelCAD vocabulary, which is not derivable from the schema.

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

Conciseness3/5

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

The first two sentences say the same thing twice ('Use this when you need to solve a 2D sketch constraint set. Solve a 2D sketch constraint set.'), which is wasted space. The remaining content is appropriately terse and the pass/receive contract is front-loaded, but the duplication is an obvious edit.

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 solver, the critical unknown is failure behavior — what happens with conflicting, over-constrained, or under-constrained input, and whether partial solutions are returned. Annotations and the existing output schema cover safety and return shape, but the description stays silent on solver outcome semantics, leaving a meaningful gap.

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 description coverage is 100%, so both parameters and the entity/constraint shapes are already documented in detail, including which constraint types require a value. The description only restates the POINT/LINE/CIRCLE entity kinds and points at an external 'kernelCAD constraint vocabulary' without expanding it, so it adds little.

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?

States a specific verb and resource: 'Solve a 2D sketch constraint set', which separates it from the assembly-oriented solve_mates sibling by virtue of the domain (2D sketch constraints vs mates). It never names an alternative explicitly, so the differentiation is implied by wording rather than stated.

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?

'Use this when you need to solve a 2D sketch constraint set' is effectively a restatement of the tool name with no condition that excludes anything. There is no when-not guidance and no mention of solve_mates or other siblings; an agent must infer the choice from the resource name alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.