freecad-tool-server AGENTS.md

Setup instructions for an HTTP tool server that lets AI agents create 3D CAD models in FreeCAD, a computer-aided design application. They cover installing dependencies, starting the server, checking its health, and reading responses.

In plain words
What is it for?
Use them to install and start the server, call its REST endpoints, open its API documentation, and handle success or error responses.
Why use it?
They give an agent the exact setup and response rules needed to operate the FreeCAD server reliably.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mattackerman1/freecad-tool-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/mattackerman1/freecad-tool-server

Made for: Codex, OpenCode.

Per session 2,147 This file is loaded in full into every session.
When invoked 2,147 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02147 $0.02147
Opus 5 $0.01073 $0.01073
Sonnet 5 $0.00429 $0.00429
Haiku 4.5 $0.00215 $0.00215

Measured yesterday against content hash 866ad4d7900a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

freecad-tool-server AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

import urllib.request, json
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 224 lines

How it starts

The opening of the file, as written. The whole thing — 224 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — FreeCAD Tool Server: Agent Quickstart

This file is the operating manual for any AI agent driving the FreeCAD tool server. It is intentionally named AGENTS.md (agent-agnostic). A copy is provided as CLAUDE.md so Claude Code picks it up automatically. Replace <PROJECT_DIR> with the absolute path where you cloned this repo.

This is an HTTP tool server that lets AI agents build 3D CAD geometry by calling REST endpoints. The server runs inside FreeCAD's bundled Python — not system Python.


Setup

Install dependencies (once)

"C:\Program Files\FreeCAD 1.1\bin\python.exe" -m pip install fastapi "uvicorn[standard]" "pydantic>=2.7"

Start the server

cd <PROJECT_DIR>
start.bat

Server runs at http://localhost:8000 · Swagger UI at http://localhost:8000/docs

Health check

GET http://localhost:8000/health

Returns {"success": true, "data": {"freecad_available": true, ...}}.


Every response has this envelope

{
  "success": true,
  "message": "Human-readable summary",
  "data": { ... },
  "warnings": [],
  "errors": []
}

Always check success before using data. On failure, errors[0] contains the reason.


Required first call

POST /document/create
{"name": "MyModel"}

Every geometry tool requires an active document. Call this before anything else.


Core modeling loop

create_document
  → add primitives (add_box / add_cylinder / add_cone / add_wing)
  → boolean ops (boolean_union / boolean_cut / make_hole)
  → inspect (get_shape_info / bounding_box)
  → finish (fillet_edges / chamfer_edges)
  → export (export_step)
  → validate (validate_step)

Most important endpoints

Path What it does
POST /document/create Open a document (required first)
POST /shapes/add_box Box primitive
POST /shapes/add_cylinder Cylinder (axis: x/y/z)
POST /shapes/add_wing NACA 4-digit airfoil loft
POST /operations/boolean_union Fuse two shapes
POST /operations/boolean_cut Subtract one shape from another
POST /operations/make_hole Drill a cylindrical hole
POST /operations/mirror Mirror across xy/xz/yz plane (case-insensitive)
POST /operations/fillet_edges Round edges (all, top, bottom, all_vertical)
POST /model/get_shape_info Volume, faces, edge count for a named shape
POST /model/check_interference Intersection volume of two shapes — detects unwanted collisions or missing engagement
POST /model/check_min_distance Minimum surface-to-surface gap — verifies clearances
POST /model/screenshot PNG render of a shape or the whole document (base64 or file)
GET /model/bounding_box Axis-aligned bounding box of all shapes
POST /model/export_step Export named shape as STEP file
POST /model/validate_step Import STEP, verify solid count + watertight
POST /model/export_assembly Combine multiple STEP files into one assembly
GET /document/status List all shapes in session

Read the full file on GitHub · 224 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 224 lines · 2,147 tokens per session scan A 866ad4d7900a

Subscribe to this mod's changes

freecad-tool-server AGENTS.md is an instructions file published in the GitHub repository mattackerman1/freecad-tool-server (1 stars, last pushed 1mo ago), licensed MIT. It adds 2,147 tokens to every session, about $0.0107 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens