dxf-cad-mcp
Use MCP tools to generate, inspect, preview, export, and open 2D DXF CAD drawings locally.
dxf_create: create empty DXF files (R12–R2018, default R2010).dxf_draw: append 2D entities: line, polyline, rectangle, circle, arc, ellipse, point, text, mtext.dxf_dimensions: add linear, aligned, radius, diameter, and angular dimensions with measured values.dxf_hatch: add solid or pattern hatches on closed polygon boundaries.dxf_splines: add 2nd- or 3rd-degree splines through fit points.dxf_blocks: define blocks and insert rotated/scaled block references.dxf_layers: create or update layers with colors and linetypes.dxf_read: inspect DXF version, entity statistics, bounding box, and layers.dxf_render: render PNG previews locally.dxf_export_pdf: export vector PDFs with auto, A4, A3, or A2 page sizing.dxf_open_in_autocad: open DXF/DWG files in macOS AutoCAD.
Note: the provided schema exposes 11 tools; the README lists additional tools (query, modify, delete, restore, convert-to-DWG) that are not in this schema.
Provides a tool to open generated DXF or DWG drawings directly in a local AutoCAD installation on macOS, automatically locating AutoCAD applications under /Applications/Autodesk and preferring full versions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dxf-cad-mcpdraw a 120x80 plate with 4 corner holes, dimension it, then render a PNG preview"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dxf-cad-mcp
轻量级 DXF CAD MCP 服务器:让任何 AI agent(Claude / dsh / Cursor …)通过 MCP 协议 画工程图,不依赖 CAD 图形界面。
创建 DXF → 绘制实体/标注/填充/图块 → 图层管理 → 检查图纸
→ PNG 预览 / 矢量 PDF 导出 → 一键打开到 CAD跨平台:macOS / Windows / Linux 均可运行(DXF 是 Autodesk 公开规范的交换格式)
纯本地:ezdxf + matplotlib,不需要网络,不需要 CAD 授权即可生成图纸
DWG 输出:
dxf_convert_dwg一键 DXF→DWG(LibreDWG,DWG 是专有格式,ezdxf 写不了)macOS + AutoCAD 友好:内置中文字体(.ttc)与 "白/黑" 双色(ACI 7)渲染修复
为什么走 DXF 路线
AutoCAD for Mac 没有 AppleScript / COM / .NET 接口,直接操控 UI 不可行 (Windows 上的 CAD MCP 项目大多依赖 COM,难以移植)
DXF 是公开交换格式:ezdxf 纯本地读写,生成的图纸任何 CAD 软件都能打开 (AutoCAD / LibreCAD / QCAD / FreeCAD …)
"以文件为中心" 的架构:稳定、可验证、可回放——PNG/PDF 预览与 CAD 终显互相对照
Related MCP server: aspicio-dxf-viewer
特性
16 个 MCP 工具,覆盖完整 2D 绘图 + 编辑工作流(见下表)
图层状态控制:关闭(不显示不打印)/ 冻结(不显示且不参与重生成)/ 锁定(显示但不能编辑),渲染预览与 AutoCAD 行为一致
编辑闭环:
dxf_query定位 →dxf_modify/dxf_delete修改 → 自动滚动备份(.bak1~.bak5)→dxf_restore一键回滚,所有改文件的 工具(含绘制类)落盘前自动备份9 种基础实体 + 5 种尺寸标注 + 27 种标准填充图案 + 样条 + 图块
颜色三种写法:ACI 数字 / 颜色名(
"red")/#RRGGBB真彩色内置标准线型:Dashed / Center / Hidden / Phantom / Dashdot
PNG 预览 + 矢量 PDF 导出(auto 自适应或 A4/A3/A2 横版)
中文渲染:启动时自动注册系统 CJK 字体,中文标注/文字预览不空白
工具列表(16 个)
工具 | 说明 |
| 创建空 DXF(版本 R12~R2018,默认 R2010) |
| 追加实体:line / polyline / rectangle / circle / arc / ellipse / point / text / mtext;文件不存在自动创建,引用的图层自动创建 |
| 追加尺寸标注:linear / aligned / radius / diameter / angular;返回每个标注的实测值 |
| 追加填充:solid 实底 / ANSI31 等标准图案;闭合多边形边界 |
| 追加样条线(过拟合点集的 2/3 阶样条) |
| 定义图块(内含 |
| 创建/更新/重命名/删除图层(颜色:ACI 数字 / 颜色名 / #RRGGBB;线型:Continuous/Dashed/Center/Hidden/Phantom/Dashdot;状态: |
| 检查图纸(DXF / DWG 均支持):版本、实体统计、类型分布、包围盒、图层(含开关/冻结/锁定状态与颜色);DWG 经 LibreDWG 自动转读 |
| 查找实体(按类型/图层/handle/文字子串),返回 handle + 类型 + 图层 + 摘要;编辑类工具的前置定位 |
| 删除实体(handle/类型/图层;删 DIMENSION 时同步清空其 *D 图形块) |
| 修改实体:图层/颜色/线型/文字内容 + 移动/绕点旋转/绕点缩放 |
| 从自动滚动备份(.bak1 最新 ~ .bak5 最旧)恢复文件 |
| 渲染 PNG 预览(ezdxf + matplotlib,不需要打开 CAD) |
| 导出矢量 PDF(线条/文字保持矢量,可 auto 自适应或 A4/A3/A2 横版) |
| DXF → DWG 转换(LibreDWG dxf2dwg,纯本地;版本 r12/r14/r2000/r2004,默认 r2000) |
| 用 macOS |
快速开始
git clone <repo-url> dxf-cad-mcp && cd dxf-cad-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt # mcp<2, ezdxf, matplotlib可选:
dxf_convert_dwg依赖系统安装 LibreDWG(提供dxf2dwg命令):brew install libredwg(macOS)/apt install libredwg(Debian/Ubuntu)。 未安装时该工具返回安装提示,其余 11 个工具不受影响。
或者直接作为包安装(附带 dxf-cad-mcp 命令):
pip install . # 或 pipx install .不经 MCP 先试一把(生成一张带标注/填充/图块的示例图):
.venv/bin/python examples/quickstart.py
# 输出 examples/quickstart.dxf / .png / .pdf接入 MCP 客户端
服务器使用 stdio 传输,在任何支持 MCP 的客户端里配置命令行即可。
dsh(~/.dsh/profiles/web/cordis.patch.yml):
- insert:
- id: mcp-dxf-cad
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: dxf-cad
transport: stdio
command: /path/to/dxf-cad-mcp/.venv/bin/python
args: ['/path/to/dxf-cad-mcp/server.py']
cwd: /path/to/dxf-cad-mcp
toolCallTimeoutMs: 120000通用 MCP 客户端(Claude Desktop / Cursor 等):
{
"mcpServers": {
"dxf-cad": {
"command": "/path/to/dxf-cad-mcp/.venv/bin/python",
"args": ["/path/to/dxf-cad-mcp/server.py"]
}
}
}测试
.venv/bin/python test_client.py # 端到端(第一批):基础实体 + 渲染
.venv/bin/python test_client2.py # 端到端(第二批):标注/填充/样条/图块 + PDF测试产物输出到 test_output/(已 gitignore)。
已知限制
仅 2D:无参数化实体/约束/动态块(DXF 格式本身不含这些数据)
DXF 写入版本最高 R2018(AC1032),AutoCAD 2018+ 均可读取
标注预览使用 ezdxf 简化渲染器,与 CAD 显示可能有差异(AutoCAD 打开时按 定义点重新渲染,以 CAD 显示为准)
标注预览颜色:
*D几何块实体默认 ByBlock,预览按块所在图层(0)解析, 放在彩色标注层的标注预览仍显示白色——给*D块实体设显式颜色即可让 预览跟随;AutoCAD 中按 ByLayer 渲染,终显正确填充边界仅支持闭合多边形(圆形/弧线边界暂不支持)
仅 model space;布局/图纸空间未实现
dxf_convert_dwg/ DWG 读取走 LibreDWG 开源实现,成熟度低于 Autodesk 官方: MATERIAL / MLEADERSTYLE 等专有对象自动跳过(不影响几何);转换前会把 MTEXT 旋转角归零(绕开 LibreDWG 解析 bug),AutoCAD 打开后标注文字按定义点重渲染, 显示不受影响LibreDWG 0.14 的 r2004 往返不完整(转出 DXF 缺 EOF,读回即失败):
dxf_convert_dwg会回读验证并标verified=false,dxf_read返回明确错误; DWG 转换/读取建议用 r2000dxf_open_in_autocad仅 macOS(依赖open命令)mcp SDK 固定
<2:2.x 把 FastMCP 改名 MCPServer,与 v1 客户端生态不兼容
项目结构
dxf-cad-mcp/
├── server.py # MCP 服务器(16 个工具)
├── examples/
│ └── quickstart.py # 直调示例(无需 MCP 协议)
├── test_client.py # 端到端测试(第一批)
├── test_client2.py # 端到端测试(第二批)
├── 修复记录/ # 每次修复/更改的带日期 md 记录(README.md 为索引)
├── requirements.txt
├── pyproject.toml
├── LICENSE # MIT
└── README.md修复记录
详见 修复记录/(每次修复/更改的带日期记录)。
License
Available Tools
11 toolsdxf_blocksA
定义图块(BLOCK)并向图纸插入图块引用(INSERT);文件不存在时自动创建。
blocks: 图块定义列表,每个: name (必填) 图块名(已存在同名图块会报错) base_point 插入基准点(可选,默认 [0,0]) entities (必填) 图块内实体,格式与 dxf_draw 的 entities 完全相同 (line/polyline/rectangle/circle/arc/ellipse/point/text/mtext)
refs: 图块引用列表(可省略),每个: block (必填) 图块名 insert (必填) 插入点 [x,y] rotation 旋转角度(可选,度) x_scale / y_scale 缩放(可选,默认 1) layer / color 公共可选字段
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| refs | No | ||
| blocks | No | ||
| dxfversion | No | R2010 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It usefully discloses that the file is auto-created when missing and that a duplicate block name raises an error, which is genuine behavioral context. It does not cover permissions, what happens to pre-existing drawing content, or return behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first clause, followed by a well-structured indented list of nested fields. It is appropriately sized for a nested-object tool, with only minor redundancy across the layer/color 'common optional fields' note.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations, no output schema, and nested objects, the description supplies the crucial nested-entity contract and the duplicate-name/auto-create behaviors. It is slightly short on top-level parameter semantics (path, dxfversion) and any return/confirmation behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the schema only declares opaque arrays (additionalProperties: true), so the description's detailed breakdown of blocks (name/base_point/entities) and refs (block/insert/rotation/x_scale/y_scale/layer/color) is a substantial compensation. It omits the required path and the dxfversion parameter, but documents the nested contract the schema leaves blank.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific pair of verbs and resources: define blocks (BLOCK) and insert block references (INSERT), plus an auto-create side effect. It references the sibling dxf_draw to anchor the entity format, though it doesn't fully spell out its role distinction from dxf_create or dxf_draw.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the operation (use this when you need reusable block definitions plus inserts), and it notes that the block entity format matches dxf_draw. There is no explicit when-to-use-vs-alternatives or when-not guidance, so the agent must infer the boundary with dxf_draw/dxf_create.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_createA
创建一个新的空 DXF 文件。
Args: path: 输出文件完整路径(.dxf)。 dxfversion: DXF 版本,可选 R12/R13/R14/R2000/R2004/R2007/R2010/R2013/R2018, 默认 R2010(兼容性最好的常用版本;AutoCAD 2024 全部支持)。 给老软件用就选更老的版本。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| dxfversion | No | R2010 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It helpfully discloses the default version and its compatibility rationale, but omits critical file-creation semantics: whether an existing file at 'path' is overwritten or errors, and whether parent directories are created. These gaps are material for a write/create tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the one-line purpose followed by an Args block for exactly the two parameters. It is appropriately sized with little waste; the version list is lengthy but earns its place given the schema has no enum.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter create tool with no output schema, the description covers purpose and both parameters, but omits what the call returns (e.g., the created path or a handle) and the overwrite behavior on an existing path. These omissions leave an agent unable to predict the result of a call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the schema provides no enum or default text, so the description must compensate. It does so well: it names the required full output path (with .dxf extension) and lists the full set of valid dxfversion values with the R2010 default plus selection advice, information absent from the schema itself.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'creates a new empty DXF file.' This clearly distinguishes it from siblings like dxf_read, dxf_draw, and dxf_render, which operate on existing files. An agent can identify the create 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the tool name and sibling set (use this to initialize a file before drawing), but the description never explicitly says when to use this versus dxf_read/dxf_draw. The only guidance offered is version-selection advice ('use older versions for old software'), which is parameter guidance rather than tool-selection guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_dimensionsA
向 DXF 图纸追加尺寸标注;文件不存在时自动创建。
每个标注是一个 dict,公共可选字段:layer、color、dimstyle(默认 "Standard")、 text(自定义标注文字,不传则显示实测值)。
标注类型与必填字段(坐标单位与绘图一致): linear: p1, p2, location[标注线位置点, 可选], angle(0=水平标注, 90=垂直) aligned: p1, p2, location[标注线位置点, 可选] radius: center, radius, angle(引线方向, 度, 可选), location(可选) diameter: center, radius, angle(可选), location(可选) angular: center, p1, p2[两条射线的端点], location(标注弧位置点, 可选, 不传则画在角平分线上)
返回值含每个标注的实测测量值(measurement),可直接核对。 注意:标注的预览渲染是 ezdxf 的简化实现,与 AutoCAD 的显示可能有差异 (例如 angular 预览可能显示补角);打开 AutoCAD 后 CAD 会按定义点 重新渲染,以 CAD 显示为准。
| Name | Required | Description | Default |
|---|---|---|---|
| dims | Yes | ||
| path | Yes | ||
| dxfversion | No | R2010 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full load and does well: it discloses file auto-creation, that the return value includes per-dimension measurement values for verification, and a substantive caveat that ezdxf preview rendering differs from AutoCAD (e.g. angular may show the supplementary angle, and CAD re-renders on open). It stops short of stating permissions or failure modes, but the behavioral disclosure 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Content is front-loaded with the core purpose, then a well-structured field/type listing, then the return-value and rendering notes. The per-type enumeration is dense but each line earns its place; nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, yet the description compensates by explaining that the return contains per-dimension measurement values, and it flags the rendering-fidelity caveat. Combined with the thorough dims documentation, an agent has enough to invoke this correctly, though error/auth behavior remains unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the nested `dims` array is untyped in the schema, yet the description compensates heavily by documenting common optional fields (layer, color, dimstyle default "Standard", text) and the required fields per dimension type (linear/aligned/radius/diameter/angular). Only `path` and `dxfversion` go undescribed, which are largely self-evident.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ("向 DXF 图纸追加尺寸标注") and immediately notes the auto-create behavior. The dimension-oriented framing distinguishes it cleanly from sibling tools like dxf_draw, dxf_hatch, and dxf_splines without needing to name them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description enumerates the five supported dimension types and their required fields, which implicitly tells the agent when each is applicable, and notes auto-creation when the file is missing. However it never explicitly contrasts this tool with dxf_draw or states when-not to use it, so guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_drawA
向 DXF 图纸追加 2D 实体;文件不存在时自动创建。
每个实体是一个 dict,公共可选字段:layer(图层名,默认 0)、 color(ACI 数字 / 颜色名如 "red" / "#RRGGBB")。
实体类型与必填字段: line: start, end polyline: points[[x,y],...], closed(bool, 默认 false) rectangle: corner[x,y], width, height circle: center[x,y], radius arc: center[x,y], radius, start_angle, end_angle(度, 逆时针) ellipse: center[x,y], major_radius, ratio(0~1), rotation(度, 可选) point: point[x,y] text: point[x,y], text, height, rotation(度, 可选) mtext: point[x,y], text, char_height, width(可选)
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| entities | Yes | ||
| dxfversion | No | R2010 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It usefully discloses two behaviors: entities are appended (existing content is not replaced) and the file is created if absent. It says nothing about permissions, file locking, ordering, or what happens on an invalid entity type.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded statement of purpose and creation behavior, followed by a scannable entity reference. Every line carries information that the empty schema does not, so the length is earned rather than padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a mutation tool with no annotations and no output schema, the description covers the genuinely complex part (the entity dictionary grammar) completely enough to construct a valid call. Remaining gaps are path/dxfversion semantics and return behavior, which matter less than getting the entity shapes right.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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, and it does so thoroughly for the hard parameter: the entity grammar, shared optional fields (layer, color with ACI/name/hex forms), and per-type required fields are all spelled out. It leaves 'path' and the 'dxfversion' default undocumented, which are minor given their obvious semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: append 2D entities to a DXF drawing, plus the create-if-missing condition. It is clearly distinguishable from read/render/export siblings, though it never explicitly contrasts itself with dxf_create or dxf_blocks, which also write geometry.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'append to a DXF drawing' and the auto-create note, but there is no explicit when-to-use versus dxf_create, dxf_blocks, or dxf_splines. The agent must infer which sibling to pick for a given geometry task.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_export_pdfA
把 DXF 导出为矢量 PDF(线条/文字保持矢量,可无限放大,适合打印归档)。
Args: path: 源 DXF 文件。 pdf_path: 输出 PDF 路径。 background: 背景色,"white"/"black"/"dark" 或 #RRGGBB。 page_size: "auto"(默认,按图纸包围盒自适应)或 "A4"/"A3"/"A2"(横版)。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pdf_path | Yes | ||
| page_size | No | auto | |
| background | No | white |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses useful behavior: lines/text remain vector, infinite zoom, page_size 'auto' adapts to the drawing bounding box, and background accepts colors. However, it omits critical mutation details such as whether it overwrites an existing pdf_path, error behavior, or required permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the purpose, then uses a compact Args list. Every sentence adds value without repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple file-export tool with no output schema and no annotations, the description covers purpose and all parameters. It is mostly complete, though it omits sibling routing and overwrite/error behavior that would be useful for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description compensates by documenting all four parameters: path as source DXF, pdf_path as output, background with 'white'/'black'/'dark' or #RRGGBB, and page_size with 'auto' (bounding-box adaptive) or A4/A3/A2 landscape. This adds complete parameter meaning beyond the schema's titles.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('导出') and resource ('DXF 为矢量 PDF') with output characteristics, but it does not name or differentiate against siblings such as dxf_render or dxf_open_in_autocad. An agent can infer the tool exports to PDF, but explicit sibling contrast is absent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The parenthetical '适合打印归档' gives a use case, but there is no explicit when-to-use guidance, no when-not conditions, and no mention of alternatives like dxf_render. Usage is only implied by the printable/archival framing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_hatchA
向 DXF 图纸追加填充(HATCH);文件不存在时自动创建。
每个填充是一个 dict: points (必填) 闭合多边形边界顶点 [[x,y],...](按序首尾自动闭合) pattern "solid"(实底,默认)或标准图案名,如 "ANSI31"(斜线)、 "ANSI32"、"CROSS"(网格)、"DOTT"/"DOTS"、"NET"、"GRAVEL"、 "BRICK"、"AR-CONC"(混凝土)、"TRUSS"(桁架)、"WAVES" 等 scale 图案缩放(默认 1.0,越大线越疏) angle 图案旋转角度(默认 0) layer / color 公共可选字段
注意:圆形/弧线边界暂不支持(仅多边形边界);复杂边界建议拆成多个填充。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| hatches | Yes | ||
| dxfversion | No | R2010 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses that it appends (additive, not overwrite), auto-creates the file if absent, supports only polygon boundaries, and recommends splitting complex boundaries. It omits any permission/auth requirements and the return behavior, keeping it below a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with purpose and file-creation behavior, then a well-organized field-by-field layout. The pattern-name list is long but each entry adds concrete selectable value; nothing is padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and 0% schema coverage, the description is quite complete for invoking the tool: it explains the required hatch structure, defaults, and boundary limitations. Missing only the meaning of path/dxfversion and the return value.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate, and it thoroughly documents the nested hatches dict (points required, pattern/scale/angle semantics, layer/color, default values, and a concrete list of pattern names). It leaves the top-level path and dxfversion parameters essentially undocumented, so it is strong but not complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (append a HATCH fill to a DXF drawing) and adds the important auto-create-file behavior. It is clearly distinguishable from siblings like dxf_draw and dxf_create without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear practical applicability context: hatch is for filling closed areas and only polygon boundaries are supported, with complex boundaries to be split into multiple hatches. It does not name an explicit alternative tool (e.g. dxf_draw) or state when NOT to use it, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_layersB
创建或更新图层。
每个图层: {name(必填), color(可选, 同 color 规则), linetype(可选, 如 "Continuous"/"Dashed"/"Center"/"Hidden")}. 文件不存在时先创建。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| layers | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose real behavior: it auto-creates the file if missing and specifies which layer fields are required vs optional, with concrete linetype values. However, for an 'update' operation it never says whether existing layers are merged or overwritten, nor whether the file is modified in place — the key ambiguity for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Compact and front-loaded: the purpose comes first, then the per-layer field spec, then the file-creation caveat. Only the dangling '同 color 规则' cross-reference costs it, since that rule is defined nowhere in this definition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter mutation tool with no annotations and no output schema, the description covers the layer payload and the auto-create side effect but omits overwrite semantics, the meaning of 'path', and any indication of what the call returns. Adequate but with clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the layers array is an untyped object, so the description must compensate. It does document the layer object's fields (name required, color/linetype optional) with example linetype values, which is genuinely additive, but the required 'path' parameter is never explained and the 'color 规则' is deferred to an external rule the agent cannot see.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource pair — 创建或更新图层 (create or update layers) — which is unambiguous and clearly distinct from drawing/entity siblings like dxf_draw, dxf_hatch or dxf_splines. It stops short of naming any sibling or clarifying its relationship to dxf_create, so it is clear but not differentiating.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: the tool obviously defines layers, and '文件不存在时先创建' hints at a precondition, but there is no statement of when to prefer this over dxf_create or when layers must exist before dxf_draw. No exclusions or alternatives are offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_open_in_autocadB
把 DXF(或 DWG)文件打开到本机的 AutoCAD(macOS open 调用)。
Args: path: 要打开的图纸文件。 prefer: 可选,指定优先使用的 .app 路径(默认自动选择 /Applications/Autodesk 下的 AutoCAD,完整版优先)。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| prefer | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It usefully discloses the mechanism (macOS `open` invocation) and the default app-selection behavior for `prefer`, but it does not state prerequisites such as AutoCAD being installed, what happens on failure, or whether the call blocks/returns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in a single sentence, followed by concise per-argument notes. Nothing is padded, though the argument block could be slightly tighter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter launcher with no output schema or annotations, the description covers the core action and both parameters, including the default selection behavior. It is close to complete, missing only prerequisite/error-handling context, which is a minor gap for this tool's low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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, and it does: `path` is described as the drawing file to open, and `prefer` is explained as an optional preferred .app path with the default auto-selection rule (AutoCAD under /Applications/Autodesk, full version preferred). This adds real meaning beyond the bare parameter titles.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: opening DXF (or DWG) files into the local AutoCAD. It distinguishes itself from siblings like dxf_read/dxf_render by clarifying that this launches AutoCAD via a macOS `open` call, but it never explicitly names or contrasts an alternative tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what the tool does but gives no when-to-use guidance, no conditions for choosing it over dxf_read or dxf_render, and no exclusions. Usage context is only implied by the purpose sentence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_readB
检查一张 DXF 图纸:DXF 版本、实体总数与类型分布、包围盒、图层列表。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It usefully enumerates the inspected outputs (version, entity count, type distribution, bounding box, layers), which implies a non-mutating read, but never states that the drawing is not modified, what happens on a missing/invalid path, or any auth/permission requirement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One compact sentence, front-loaded with the action and resource, followed by the specific information returned. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the enumeration of returned fields (version, entity counts, type distribution, bounding box, layer list) usefully substitutes for a return-value spec. The gap is the undocumented path parameter, which nothing else in the definition covers.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the single 'path' parameter has no description in the schema. The description adds nothing about what path refers to (file path vs. drawing name, relative vs. absolute, expected extension), leaving the only input undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('检查一张 DXF 图纸') and enumerates what is inspected (version, entity count/type distribution, bounding box, layers). This is clearly distinguishable from write-oriented siblings like dxf_create and dxf_draw, though it never names them explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No statement of when to use this versus dxf_dimensions, dxf_layers, or the other inspection-adjacent siblings, and no prerequisites or exclusions. The agent must infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_renderA
把 DXF 渲染成 PNG 预览图(纯本地,不需要打开 AutoCAD)。
Args: path: 源 DXF 文件。 png_path: 输出 PNG 路径。 dpi: 分辨率,默认 150(100~300)。 background: 背景色,"white"/"black"/"dark" 或 #RRGGBB。
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | No | ||
| path | Yes | ||
| png_path | Yes | ||
| background | No | white |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that rendering is purely local, but says nothing about whether an existing PNG at png_path is overwritten, what errors occur on a missing/invalid DXF, or any return value.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose is front-loaded in one sentence, followed by a compact Args block; every line carries information. Minor slack in repeating the obvious meaning of path/png_path.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool that writes a file with no annotations and no output schema, the argument coverage is complete, but the description omits the behavioral essentials an agent needs: overwrite behavior on png_path and failure modes for unreadable DXF input.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description documents all four parameters and adds constraints absent from the schema: the dpi range (100~300) and accepted background values ('white'/'black'/'dark' or #RRGGBB). This fully compensates for the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states a specific verb+resource: rendering DXF to a PNG preview, and adds a distinguishing scoping note ('纯本地,不需要打开 AutoCAD') that separates it from dxf_open_in_autocad. Sibling dxf_export_pdf is only implicitly contrasted via output format, so it falls just short of 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'preview' framing and 'no AutoCAD needed' note imply the use case (quick local thumbnail generation), but nothing states explicitly when to choose this over dxf_export_pdf or dxf_open_in_autocad, and no prerequisites are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dxf_splinesB
向 DXF 图纸追加样条线(SPLINE);文件不存在时自动创建。
每个样条是一个 dict: points (必填) 拟合点 [[x,y],...](≥3 个,样条穿过这些点) degree 样条阶数,2 或 3(默认 3) layer / color 公共可选字段
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| splines | Yes | ||
| dxfversion | No | R2010 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It usefully discloses that the operation is additive ('append') and that the file is auto-created when missing, but says nothing about permissions, return values, whether existing geometry is preserved, or how dxfversion affects the result.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose sentence is front-loaded, followed by a compact bulleted breakdown of the spline dict. Every line contributes information; no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description must be self-sufficient. It handles the complex nested spline structure well but omits any meaning for `path` and `dxfversion`, and gives no return-value or error context, so it is adequate rather than complete for a 3-parameter mutation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It does document the nested splines object richly (points required with ≥3 fit points, degree 2 or 3 default 3, optional layer/color), which adds real value over an opaque additionalProperties schema. However, the top-level `path` and `dxfversion` parameters receive no explanation at all, leaving a substantial gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (append/追加) and resource (SPLINE) targeting DXF drawings, plus the auto-create-file behavior. It is clearly distinguishable from siblings like dxf_read or dxf_render, though it never explicitly contrasts itself with dxf_draw or dxf_create, which could also add geometry.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use guidance, no mention of alternatives (e.g., dxf_draw for other geometry, dxf_create for making a file without drawing), and no stated prerequisites. Usage is only implied by the 'append' verb and the auto-create note.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v0.2.0- First observed
dxf_blocks - First observed
dxf_create - First observed
dxf_dimensions - First observed
dxf_draw - First observed
dxf_export_pdf - First observed
dxf_hatch - First observed
dxf_layers - First observed
dxf_open_in_autocad - First observed
dxf_read - First observed
dxf_render - First observed
dxf_splines
TDQS
Scored across 11 tools
Each tool targets a distinct operation: creation, entity drawing, dimensions, hatching, splines, blocks, layers, reading, and three separate output targets (PNG/PDF/AutoCAD). The only minor overlap is dxf_create vs dxf_draw (draw auto-creates), but their intent is clearly separated in the descriptions.
All tools share a consistent dxf_ prefix, but the suffix convention is mixed: some use verbs (dxf_create, dxf_draw, dxf_read, dxf_render) while others use plural nouns (dxf_dimensions, dxf_splines, dxf_hatch, dxf_blocks, dxf_layers). Still readable and predictable enough overall.
11 tools is well-scoped for a DXF manipulation server, with each tool covering a distinct CAD concept or output format. No bloat and no obviously trivial tools.
The server covers creation, drawing, annotation, blocks, layers, inspection, and export well, but it is append-only: there is no way to modify or delete existing entities or layers, and hatch boundaries cannot be circular/arc. These are notable gaps for iterative CAD editing workflows.
Maintenance
Related MCP Connectors
DXF and PDF/X-4 for AI agents: structured facts, PNG renders, an interactive in-chat viewer.
- OwlCADOAuthcom.owlcad
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
PDF, image, video, OCR, screenshot, SQL, QR and text tools for agents. No API key, no signup.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI agents to automate AutoCAD LT and create DXF files headless, with tools for drawing, entity, layer, block, annotation, PID, and system operations.16MIT
- AlicenseNot gradedqualityAmaintenanceOpens, inspects, and renders DXF/CAD drawings for AI agents: describe_dxf returns structured facts (layers with actual drawn colors, units, bounds, text content) and render_dxf returns PNG images. On MCP Apps hosts like ChatGPT and Claude, view_dxf opens an interactive in-chat viewer with pan, zoom, and layer toggles.5MIT
- AlicenseAqualityCmaintenanceEnables reading, analyzing, and editing CAD files (DXF and DWG) via natural language, including entity queries, layer management, and safe copy-based edits.171MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to conversationally control Autodesk AutoCAD, drawing, inspecting, and editing plans, and includes a cross-platform DXF engine that runs without AutoCAD on macOS and Linux. It exposes tools for rendering views as images, batching geometry, blocks, and structures, measuring and checking plans, and undoing whole batches.12MIT