Skip to main content
Glama
TommeCAD FreeCAD MCP

TommeCAD FreeCAD MCP

sketch_set_constraint_value

Sets a sketch dimensional constraint value, using millimeters for lengths and degrees for angles, to update sketch geometry with explicit units.

Instructions

Change a dimensional constraint; angle constraints use degrees, all lengths use mm.

Contract: explicit internal names recommended. Length mm, area mm^2, volume mm^3; field units override defaults. Errors: invalid_arguments, document_not_found, object_not_found, transaction_conflict, operation_failed, execution_timeout; transport failures are possible. Timeout is not cancellation: never blindly retry mutations. Legacy return shape preserved.

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_name": "<sketch_name>",
      "constraint_idx": "<constraint_idx>",
      "value": "<value>"
    },
    "name": "sketch_set_constraint_value"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYesvalue: mm_or_deg_by_constraint_type, sketch_local.
doc_nameNoInternal document Name, never Label/path. Omitted/null uses active document (legacy); pass explicitly.
sketch_nameYesInternal object Name in the selected document, never Label; must have the type required by this tool.
constraint_idxYesSketch constraint index, zero-based in the current sketch state.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.9/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 error taxonomy (invalid_arguments, document_not_found, object_not_found, transaction_conflict, operation_failed, execution_timeout), warns that transport failures are possible, and explicitly states that timeout is not cancellation and mutations must not be blindly retried. It stops short of stating permission requirements or whether a failed mutation rolls back, but the mutation-safety context is well above baseline.

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?

Front-loaded with the one-line purpose, then compact contract clauses covering units, errors, and retry safety. Dense but nearly every clause carries operational meaning; "Legacy return shape preserved" is the only line whose practical implication is unclear to a fresh agent.

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

Completeness5/5

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

For a 4-parameter mutation tool with no annotations, the description supplies units and precedence, error conditions, retry hazards, and naming expectations; the existing output schema means return values need not be explained. An agent has enough to invoke this correctly and handle failures sensibly.

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; the description earns a bump by adding unit semantics the schema only gestures at — degrees for angle constraints, mm for lengths, plus mm^2/mm^3 for area and volume — and the precedence rule that field units override defaults. The recommendation to use explicit internal names reinforces the schema's doc_name/sketch_name guidance.

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?

Opens with a specific verb+resource: "Change a dimensional constraint." That clearly separates it from siblings that create constraints (sketch_constrain_angle) or change constraint mode, though it never names an alternative explicitly. An agent can identify the operation without opening the schema.

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?

Usage is implied rather than stated: the tool modifies an existing constraint's value, and the unit rules (degrees for angles, mm for lengths) tell the agent what to pass. There is no explicit when-to-use/when-not guidance or pointer to sibling tools for creating versus editing constraints, which is a real gap given how many constraint-related siblings exist.

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