Skip to main content
Glama

Add Constraint

add_constraint
Idempotent

Use this when you need to add a sketch constraint to a list. Append one validated sketch constraint to a constraint list. Side-effect-free: pass { constraints, constraint } and receive the updated list.

Input Schema

NameRequiredDescriptionDefault
constraintYesThe constraint to append.
constraintsNoExisting constraint list to append to (omit for an empty list).

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": "Updated constraint list.",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "errors": {
      -    "description": "Validation errors (present on failure).",
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  "ok": {
      -    "type": "boolean"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "ok",
      -  "constraints"
      -]
  2. Changed6 schema fields changed
    • addedInput schema / properties / constraint / description
      Added value: +"The constraint to append."
    • addedInput schema / properties / constraint / 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 / constraint / required
      Added value: +[
      +  "id",
      +  "type",
      +  "entities"
      +]
    • addedInput schema / properties / constraints / description
      Added value: +"Existing constraint list to append to (omit for an empty list)."
    • addedInput schema / properties / constraints / items / properties
      Added value: +{
      +  "entities": {
      +    "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": {
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / constraints / items / required
      Added value: +[
      +  "id",
      +  "type",
      +  "entities"
      +]
  3. Changed6 schema fields changed
    • removedInput schema / properties / constraint / description
      Removed value: -"The constraint to append."
    • removedInput schema / properties / constraint / 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 / constraint / required
      Removed value: -[
      -  "id",
      -  "type",
      -  "entities"
      -]
    • removedInput schema / properties / constraints / description
      Removed value: -"Existing constraint list to append to (omit for an empty list)."
    • removedInput schema / properties / constraints / items / properties
      Removed value: -{
      -  "entities": {
      -    "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": {
      -    "type": "number"
      -  }
      -}
    • removedInput schema / properties / constraints / items / required
      Removed value: -[
      -  "id",
      -  "type",
      -  "entities"
      -]
  4. Changed6 schema fields changed
    • addedInput schema / properties / constraint / description
      Added value: +"The constraint to append."
    • addedInput schema / properties / constraint / 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 / constraint / required
      Added value: +[
      +  "id",
      +  "type",
      +  "entities"
      +]
    • addedInput schema / properties / constraints / description
      Added value: +"Existing constraint list to append to (omit for an empty list)."
    • addedInput schema / properties / constraints / items / properties
      Added value: +{
      +  "entities": {
      +    "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": {
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / constraints / items / required
      Added value: +[
      +  "id",
      +  "type",
      +  "entities"
      +]
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "constraints": {
      +      "description": "Updated constraint list.",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "errors": {
      +      "description": "Validation errors (present on failure).",
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "constraints"
      +  ],
      +  "type": "object"
      +}
  6. First observed

TDQS

A3.5/5.0
Behavior1/5

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

The description says "Side-effect-free," but the annotations declare readOnlyHint=false, meaning the tool may modify its environment. That is a direct conflict in mutation semantics; the rest of the behavioral note (validated constraint, updated list returned) is useful but does not resolve the contradiction.

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?

Three short, front-loaded sentences with little waste. The second sentence largely restates the first, which is mild redundancy rather than a major flaw.

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?

Output schema exists and the input schema is richly documented, so return values and parameter structure need not be explained. The description covers purpose and basic behavior, but the side-effect claim conflicts with annotations, leaving the agent uncertain about mutation semantics.

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%, and the schema fully documents both parameters, including nested constraint fields and enums. The description merely names the parameters and adds that the constraint is "validated," without adding syntax or format detail beyond the schema.

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

Purpose5/5

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

States a specific verb and resource: "Append one validated sketch constraint to a constraint list." The phrase "sketch constraint" distinguishes it from sibling add_* tools that handle connectors, mates, curves, and features.

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

Usage Guidelines4/5

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

Begins with explicit guidance: "Use this when you need to add a sketch constraint to a list." It gives clear context for use but does not name exclusions or alternative tools.

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.