Skip to main content
Glama
maximedns5

freecad-mcp

by maximedns5

linear_pattern

Repeat base features along a sketch axis in FreeCAD to create a linear pattern, specifying total length and number of copies.

Instructions

Repeat features along a sketch axis (PartDesign::LinearPattern).

axis_sketch/axis MUST name the sketch that owns the H_Axis/V_Axis/N_Axis
datum you want to pattern along — never a feature's Profile link. Passing
a feature reference there resolves to a nested link FreeCAD rejects, or
silently patterns nothing.

`originals` MUST be base features (a Pad or Pocket), never another
pattern. PartDesign cannot pattern a pattern: given one it produces a
perfectly valid solid that changed nothing, which this tool now reports
as a failure rather than a success.

So to build a GRID of holes, do NOT pattern a row along the
perpendicular axis. Put the whole row in ONE sketch (several add_circle
calls), pocket it once so the row is a single base feature, then pattern
that once. Verified: a 2-circle sketch pocketed and patterned gives
exactly 4 holes, while patterning a row feature gives 2 and silently
claims success.

Args:
    doc_name: The name of the document.
    body_name: The name of the PartDesign::Body.
    name: The name to give the new LinearPattern feature.
    originals: Names of the feature(s) to repeat.
    axis_sketch: Name of the sketch owning the axis datum to pattern along.
    axis: Which datum on axis_sketch: "H_Axis", "V_Axis", or "N_Axis".
    length: Total span of the pattern in mm.
    occurrences: Total number of copies, including the original (>= 2).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axisNoH_Axis
nameYes
lengthNo
doc_nameYes
body_nameYes
originalsYes
axis_sketchYes
occurrencesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral burden. It exposes non-obvious failure modes: passing a feature reference 'resolves to a nested link FreeCAD rejects, or silently patterns nothing', and patterning a pattern produces 'a perfectly valid solid that changed nothing, which this tool now reports as a failure rather than a success.' It even includes a verified example to clarify behavior.

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?

Though the description is lengthy, every sentence serves a purpose. It starts with a concise definition, then addresses critical pitfalls, provides a concrete example of correct usage, and ends with a neatly formatted Args list. The length is justified by the complexity of the tool and the number of potential mistakes.

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?

The description is contextually complete for an unannotated tool. It covers prerequisites (axis_sketch must own the datum), constraints (originals must be base features), failure modes (silent failures, false successes), and even a verified operational example. There is no output schema shown, but the description doesn't need to explain return values if the output schema exists elsewhere.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It provides detailed semantics for every parameter: axis_sketch (must own the axis datum), axis (explicitly lists H_Axis/V_Axis/N_Axis), originals (must be base features, not patterns), length ('Total span of the pattern in mm'), and occurrences ('Total number of copies, including the original (>= 2)'). Even doc_name, body_name, and name are explained clearly.

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?

The description clearly states the tool's function: 'Repeat features along a sketch axis (PartDesign::LinearPattern).' It uses a specific verb ('repeat') and resource ('features along a sketch axis'), and the mention of the PartDesign feature type distinguishes it from sibling tools like polar_pattern.

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

Usage Guidelines5/5

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

Provides explicit usage guidance with both positive requirements and negative constraints: 'axis_sketch/axis MUST name the sketch that owns the H_Axis/V_Axis/N_Axis datum — never a feature's Profile link', 'originals MUST be base features (a Pad or Pocket), never another pattern', and a clear directive for building a grid: 'do NOT pattern a row along the perpendicular axis; put the whole row in ONE sketch'. It also gives an alternative approach using add_circle.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/maximedns5/freecad-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server