Skip to main content
Glama
maximedns5

freecad-mcp

by maximedns5

pocket

Remove material from a CAD body using a sketch profile to create holes or recesses. Supports through-all cuts and automatically fails if the sketch does not intersect the material.

Instructions

Cut material out of a body with a sketch profile (PartDesign::Pocket).

Fails if no material is removed — a profile positioned over empty space
is the most common mistake, and would otherwise silently "succeed" while
doing nothing. Through-holes (through_all=True) always cut from the
midplane: a sketch sits ON its base plane, so a one-directional
ThroughAll either cuts into empty space or produces an invalid solid
depending on which side of the plane the material is on.

NOTE: a sketch-based pocket can only cut FROM the plane it sits on, so it
can never leave material (a "floor") beneath itself on that side. For a
container cavity, use instantiate_family("box_enclosure", ...) or build
the cavity as a separate cutter solid positioned at z=floor_thickness.

Args:
    doc_name: The name of the document.
    body_name: The name of the PartDesign::Body to cut.
    sketch_name: The name of the fully-constrained profile sketch.
    name: The name to give the new Pocket feature.
    length: Cut depth in mm (ignored if through_all=True).
    through_all: Cut all the way through, from the midplane.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
lengthNo
doc_nameYes
body_nameYes
sketch_nameYes
through_allNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations available, the description fully discloses critical behavioral traits: failure when no material is removed, midplane-based ThroughAll, the one-directional ThroughAll pitfall, and the inherent floor limitation. This goes beyond basic operation and teaches the agent about edge cases.

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?

The description is front-loaded with a one-sentence definition, followed by a concise failure-mode section, a NOTE, and a clean Args list. Every sentence carries critical information; there is no wasted text. Structure is logical and scannable.

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 6-parameter tool with no annotations, this description covers all parameters, explains key edge cases, and references alternatives. The presence of an output schema (not shown) means return values need not be described. The tool is fully contextualized for an AI agent.

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's Args section is essential. It explains every parameter including relationships: 'length: Cut depth in mm (ignored if through_all=True)' and 'through_all: Cut all the way through, from the midplane.' This adds meaning well beyond the bare 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?

The description starts with a specific verb+resource: 'Cut material out of a body with a sketch profile (PartDesign::Pocket).' This clearly distinguishes it from sibling operations like pad (adds material), boolean, and fillet. The tool's role as a subtractive feature is unambiguous.

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 context, including when the tool fails (profile over empty space) and how through_all behaves. It also names alternative approaches for a common use case: 'For a container cavity, use instantiate_family("box_enclosure", ...) or build the cavity as a separate cutter solid.' This is clear guidance on when to choose something else.

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