Skip to main content
Glama

AutoCAD MCP Server

Máy chủ MCP cho tự động hóa AutoCAD LTtạo DXF headless.

Một API, hai backend vẽ và hai transport kết nối:

Tùy chọn

Ghi chú

Backend

File IPC

Windows + AutoCAD LT 2024+; điều khiển qua ActiveX/COM + AutoLISP

ezdxf

Mọi nền tảng; DXF in-memory, không cần AutoCAD

Transport

stdio (mặc định)

Claude Desktop, Claude Code, client MCP cục bộ

streamable-http

ChatGPT Developer mode / remote MCP qua HTTPS tunnel

Server cung cấp 8 công cụ (drawing, entity, layer, block, annotation, pid, view, system) với dispatch theo operation. Phiên bản runtime: 3.1 (LISP dispatcher reliability v3.2).


Prerequisites

Backend File IPC (AutoCAD thật)

  • Windows 10/11 (không dùng WSL Python cho File IPC)

  • AutoCAD LT 2024+ trên Windows — AutoLISP chỉ có từ LT 2024; AutoCAD LT cho Mac không hỗ trợ AutoLISP

  • Python 3.10+ (native Windows)

  • uv package manager

Backend ezdxf (headless)

Chạy trên Linux, macOS, WSL hoặc Windows — không cần AutoCAD, chỉ tạo/sửa DXF offline.


Related MCP server: Greenloom CAD MCP Server

Quick Start

1. Clone và cài đặt

git clone https://github.com/sontakmtp-cell/autocad-mcp.git
cd autocad-mcp
uv sync

2. Auto-load LISP dispatcher (mỗi document)

State AutoLISP thuộc từng bản vẽ. Load mcp_dispatch.lsp một lần không đủ khi mở/tạo DWG mới. Cấu hình startup theo document:

  1. Thêm <repo>/lisp-code vào Support File Search Path.

  2. Thêm cùng thư mục vào TRUSTEDPATHS. Không tắt SECURELOAD.

  3. Copy lisp-code/acadltdoc.lsp.example thành acadltdoc.lsp trong một Support File Search Path.

  4. Restart AutoCAD LT, mở bản vẽ. Mỗi document nên in:

=== MCP Dispatch v3.2 reliability overrides loaded ===

Example dùng (findfile "mcp_dispatch.lsp") rồi (load ...), không hard-code path máy. Startup Suite / APPLOAD lặp lại không cần. Nếu document đang active thiếu dispatcher, MCP báo dispatcher_missing_in_active_document — server không tự mở APPLOAD.

3. Cấu hình MCP client (stdio)

Ví dụ claude_desktop_config.json:

{
  "mcpServers": {
    "autocad-mcp": {
      "command": "C:\\path\\to\\autocad-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "autocad_mcp"],
      "env": { "AUTOCAD_MCP_BACKEND": "auto" }
    }
  }
}
  • command phải trỏ tới Windows Python trong venv

  • Không dùng WSL Python khi cần File IPC

Client chạy trong WSL

Khởi động server qua cmd.exe + Windows Python:

{
  "mcpServers": {
    "autocad-mcp": {
      "type": "stdio",
      "command": "cmd.exe",
      "args": [
        "/d",
        "/s",
        "/c",
        "cd /d C:\\path\\to\\autocad-mcp && .venv\\Scripts\\python.exe -m autocad_mcp"
      ],
      "env": { "AUTOCAD_MCP_BACKEND": "auto" }
    }
  }
}

4. Kiểm tra

Từ MCP client:

system(operation="status")
  • backend: "file_ipc" — AutoCAD đang chạy và được phát hiện

  • backend: "ezdxf" — chế độ headless

Diagnostics bổ sung:

system(operation="health")
system(operation="tool_manifest")
system(operation="runtime")

Transport HTTP (ChatGPT / remote)

Transport mặc định vẫn là stdio. Để mở MCP qua mạng:

Profile

Auth

Mục đích

off

Chỉ local; stdio hoặc HTTP không remote policy

dev

No Auth (ALLOW_NO_AUTH=1)

Demo ngắn hạn, chỉ operation đọc allowlist

production

OAuth 2.1 / OIDC

Remote thật (ChatGPT, tunnel HTTPS)

Dev demo (No Authentication)

$env:AUTOCAD_MCP_BACKEND = "ezdxf"   # hoặc auto / file_ipc
$env:AUTOCAD_MCP_TRANSPORT = "streamable-http"
$env:AUTOCAD_MCP_HOST = "127.0.0.1"
$env:AUTOCAD_MCP_PORT = "8765"
$env:AUTOCAD_MCP_PATH = "/mcp"
$env:AUTOCAD_MCP_REMOTE_PROFILE = "dev"
$env:AUTOCAD_MCP_AUTH_MODE = "none"
$env:AUTOCAD_MCP_ALLOW_NO_AUTH = "1"
$env:AUTOCAD_MCP_ALLOWED_HOSTS = "127.0.0.1"

uv run python -m autocad_mcp

Hoặc dùng script tunnel Phase 3:

powershell -ExecutionPolicy Bypass -File .\scripts\run-phase3-dev.ps1

Production OAuth + ChatGPT

Server là resource server (không tự host login). Cần OIDC provider (Auth0, Okta, Cognito, …) phát hành JWT + JWKS.

powershell -ExecutionPolicy Bypass -File .\scripts\run-phase4-oauth.ps1 `
  -PublicBaseUrl "https://cad.example.com" `
  -OAuthIssuer "https://issuer.example" `
  -OAuthAudience "https://cad.example.com"
  • Endpoint MCP: https://cad.example.com/mcp

  • Metadata: https://cad.example.com/.well-known/oauth-protected-resource

  • Scopes: autocad.read, autocad.write

  • execute_lisp mặc định bị chặn trên mọi remote profile; chỉ bật khi set AUTOCAD_MCP_ALLOW_EXECUTE_LISP=1 (rủi ro cao — AutoLISP tùy ý trên máy host)

Kết nối ChatGPT (Windows — khuyến nghị)

ChatGPT gọi MCP qua HTTPS công khai. MCP chỉ bind 127.0.0.1:8765; cần Cloudflare named tunnel (không dùng Quick Tunnel *.trycloudflare.com cho OAuth domain cố định).

Cài cloudflared (một lần):

winget install --id Cloudflare.cloudflared

Mỗi phiên làm việc — 2 cửa sổ:

Cửa sổ

File

Việc

1

start_mcp_chatgpt.bat

MCP OAuth production trên 127.0.0.1:8765

2

start_cloudflare_tunnel.bat

Login Cloudflare (lần đầu) → tạo tunnel/config/DNS → tunnel run

start_cloudflare_tunnel.bat gọi scripts/setup-cloudflare-tunnel.ps1:

  1. Mở browser / in link Cloudflare login nếu chưa có ~\.cloudflared\cert.pem

  2. Chọn zone domain (ví dụ kythuatvang.com) → Authorize

  3. Tạo/chọn named tunnel, ghi config.yml (hostnamehttp://127.0.0.1:8765)

  4. Route DNS (ghi đè record cũ bằng CNAME tunnel nếu cần)

  5. Chạy tunnel (giữ cửa sổ mở)

URL gắn vào ChatGPT Developer mode (OAuth):

https://cad.kythuatvang.com/mcp

(Wrapper start_mcp_chatgpt.bat đang cấu hình site-specific cho domain/issuer Auth0 của repo này — chỉnh bat/script nếu dùng domain khác.)

Kiểm tra public trước khi connect ChatGPT:

curl.exe -sS -i "https://cad.kythuatvang.com/.well-known/oauth-protected-resource"
# kỳ vọng: 200 + JSON scopes/issuer

curl.exe -sS -i "https://cad.kythuatvang.com/mcp"
# kỳ vọng: 401 khi chưa có token (OAuth bật)

HTTP

Ý nghĩa

530

Tunnel chưa run / DNS chưa gắn named tunnel

502

Tunnel OK nhưng MCP (:8765) chưa chạy

401 trên /mcp

Đúng — client phải login OAuth

200 metadata

Resource server reachable

Tuỳ chọn PowerShell:

# Chỉ setup, không giữ tunnel
powershell -ExecutionPolicy Bypass -File .\scripts\setup-cloudflare-tunnel.ps1 -SkipRun

# Hostname / tunnel name tuỳ chỉnh
powershell -ExecutionPolicy Bypass -File .\scripts\setup-cloudflare-tunnel.ps1 `
  -Hostname "cad.example.com" -TunnelName "autocad-mcp"

Chi tiết OAuth/policy: docs/phase2-remote-policy.md, docs/phase4-oauth.md, docs/ke-hoach-chatgpt-http-bridge.md.

AUTOCAD_MCP_TRANSPORT=sse được nhận trong config nhưng chưa implement — dùng stdio hoặc streamable-http.


Tools

Mỗi tool nhận operation (string) và thường có data (object) + include_screenshot (bool).

drawing — Quản lý file bản vẽ

Operation

Mô tả

File IPC

ezdxf

create

Bản vẽ mới / reset

Yes

Yes

open

Mở bản vẽ

Yes

Yes (DXF)

info

Extents, entity, layer, block

Yes

Yes

save

Lưu (path?)

Yes

Yes

save_as_dxf

Xuất DXF

Yes

Yes

plot_pdf

Xuất PDF

Yes

No

purge

Xóa đối tượng không dùng

Yes

Yes

get_variables

Đọc biến hệ thống

Yes

Yes

undo / redo

Hoàn tác / làm lại

Yes

No

entity — Đối tượng hình học

Tạo: create_line, create_circle, create_polyline, create_rectangle, create_arc, create_ellipse, create_mtext, create_hatch

Đọc: list, count, get

Sửa: copy, move, rotate, scale, mirror, offset*, array, fillet*, chamfer*, erase

* offset, fillet, chamfer chỉ File IPC.

layer — Layer

list, create, set_current, set_properties, freeze, thaw, lock, unlock

block — Block

Operation

File IPC

ezdxf

list

Yes

Yes

insert

Yes

Yes

insert_with_attributes

Yes

Yes

get_attributes

Yes

Yes

update_attribute

Yes

Yes

define

No

Yes

annotation — Chú thích & auto-dimension

Cơ bản

  • create_text

  • create_dimension_linear / aligned / angular / radius

  • create_leader

Workflow dimension tự động (part-aware)

Operation

Vai trò

detect_parts

Gom geometry 2D thành part_1, part_2, … (read-only)

plan_dimensions

Preview plan D1, D2, … — không sửa bản vẽ

commit_dimension_plan

Ghi plan đã duyệt (một Undo group trên File IPC)

auto_dimension

Lối tắt detect → plan → commit

batch_create_dimensions

Ghi nhiều dimension một request / một Undo group

dimension_profiles

list / get / save / delete profile mm·inch·ISO

audit_dimensions

Kiểm tra chất lượng bố trí (read-only)

repair_dimension_layout

Sửa an toàn theo audit_id (trùng lặp, layer, lane)

Selector cho plan/auto (chọn một): target_part_id | entity_ids | region | selection: "current".

Profile built-in: mechanical_mm, mechanical_inch, iso_simple. Profile tùy chỉnh mặc định lưu tại %LOCALAPPDATA%\autocad-mcp\dimension_profiles.json (hoặc AUTOCAD_MCP_DIMENSION_PROFILES).

Chi tiết và ví dụ JSON: docs/auto-dimension.md.

pid — P&ID (thư viện CTO)

setup_layers, insert_symbol, list_symbols, draw_process_line, connect_equipment, add_flow_arrow, add_equipment_tag, add_line_number, insert_valve, insert_instrument, insert_pump, insert_tank

Cần cài thư viện CAD Tools Online vào:

C:\PIDv4-CTO\

view — Viewport & screenshot

Operation

Mô tả

zoom_extents

Zoom toàn bộ

zoom_window

Zoom cửa sổ x1,y1,x2,y2

get_screenshot

Chụp PNG

  • File IPC: Win32 PrintWindow (kể cả khi AutoCAD minimize)

  • ezdxf: matplotlib render

system — Server

Operation

Mô tả

status / get_backend

Backend, capabilities

health

Health check nhanh (có error_code ổn định)

runtime

Platform, Python path, backend env

tool_manifest

Tools đã đăng ký, annotation ops, feature status

init

Re-init backend

execute_lisp

Chạy AutoLISP tùy ý — File IPC; remote cần AUTOCAD_MCP_ALLOW_EXECUTE_LISP=1

Ví dụ execute_lisp:

system(operation="execute_lisp", data={"code": "(+ 1 2)"})

Architecture

MCP Client (Claude / ChatGPT / …)
        │
        ├── stdio (JSON-RPC)          ← mặc định
        └── streamable-http (/mcp)    ← remote + tunnel HTTPS
                │
                ▼
        remote policy / OAuth / path guard
                │
                ▼
     Python MCP Server (autocad_mcp 3.1)
                │
        ├── File IPC Backend (Windows)
        │         │  C:/temp/*session*/*request*.json
        │         ▼
        │   mcp_dispatch.lsp (AutoCAD LT)
        │   + auto_dimension*.lsp
        │
        └── ezdxf Backend
                  ▼
             in-memory DXF

File IPC

  • Route expression whitelist qua ActiveX: ưu tiên Document.PostCommand, fallback tường minh Document.SendCommand

  • Không dùng keyboard, clipboard, focus hay WM_CHAR

  • Trước khi gửi: kiểm tra IsQuiescent / CMDACTIVEautocad_busy nếu user đang có lệnh (MCP không gửi ESC)

  • Request file mang process/session ID + request ID; LISP mở đúng file đó

Mã lỗi ổn định: docs/file-ipc-error-model.md.
Checklist tay: docs/file-ipc-manual-test.md.


Environment Variables

Backend & IPC

Variable

Default

Mô tả

AUTOCAD_MCP_BACKEND

auto

auto | file_ipc | ezdxf

AUTOCAD_MCP_IPC_DIR

C:/temp

Thư mục file IPC

AUTOCAD_MCP_IPC_TIMEOUT

10

Timeout giây (clamp 1–300)

AUTOCAD_MCP_COM_PROGID

(auto)

Override COM ProgID AutoCAD đang chạy

AUTOCAD_MCP_ONLY_TEXT

false

Tắt đính kèm screenshot

AUTOCAD_MCP_DIMENSION_PROFILES

%LOCALAPPDATA%\…

Path file profile dimension tùy chỉnh

AUTOCAD_MCP_DEBUG_DETECT_FILE

Ghi snapshot debug backend detection

AUTOCAD_MCP_ENTRYPOINT

(auto)

Nhãn entrypoint trong tool_manifest

Nếu đổi AUTOCAD_MCP_IPC_DIR, cập nhật tương ứng biến *mcp-ipc-dir* trong lisp-code/mcp_dispatch.lsp.

Transport & remote

Variable

Default

Mô tả

AUTOCAD_MCP_TRANSPORT

stdio

stdio | streamable-http (sse chưa implement)

AUTOCAD_MCP_HOST

127.0.0.1

Bind host HTTP

AUTOCAD_MCP_PORT

8765

Port HTTP

AUTOCAD_MCP_PATH

/mcp

Path MCP endpoint

AUTOCAD_MCP_STATELESS_HTTP

false

Stateless HTTP mode

AUTOCAD_MCP_REMOTE_PROFILE

off

off | dev | production

AUTOCAD_MCP_AUTH_MODE

none

none | oauth

AUTOCAD_MCP_ALLOW_NO_AUTH

false

Bật No Auth (chỉ với profile dev)

AUTOCAD_MCP_ALLOW_EXECUTE_LISP

false

Cho phép system.execute_lisp qua remote (opt-in; rủi ro cao)

AUTOCAD_MCP_ALLOWED_HOSTS

Host allowlist (;-separated)

AUTOCAD_MCP_ALLOWED_DIRS

Thư mục file cho open/save remote (;-separated)

AUTOCAD_MCP_PUBLIC_BASE_URL

Resource URL HTTPS công khai (OAuth)

AUTOCAD_MCP_MAX_IMAGE_BYTES

5242880

Giới hạn ảnh remote (5 MB)

AUTOCAD_MCP_OAUTH_ISSUER

OIDC issuer

AUTOCAD_MCP_OAUTH_AUDIENCE

JWT aud

AUTOCAD_MCP_OAUTH_SCOPES

autocad.read autocad.write

Scopes chấp nhận


Development

uv sync
uv run pytest tests/ -v

CI: .github/workflows/test.yml.

Script hỗ trợ:

Script

Mục đích

scripts/run-phase3-dev.ps1

HTTP dev + Cloudflare Quick Tunnel demo (No Auth)

scripts/run-phase4-oauth.ps1

HTTP production OAuth (local :8765)

scripts/setup-cloudflare-tunnel.ps1

Login CF + named tunnel + DNS + tunnel run

start_mcp_chatgpt.bat

Wrapper Phase 4 OAuth (site-specific)

start_cloudflare_tunnel.bat

Wrapper named tunnel cho ChatGPT HTTPS


AutoCAD LT AutoLISP Compatibility

AutoLISP có trên AutoCAD LT 2024+ (Windows).

Hỗ trợ

Không hỗ trợ

.lsp, vl-*, file I/O, entget, selection sets

VLIDE, Express Tools đầy đủ, 3D nâng cao, AutoLISP trên Mac

Một số đường dimension tối ưu dùng ActiveX khi có; xem lisp-code/auto_dimension_activex.lsp.


Documentation

Tài liệu

Nội dung

docs/auto-dimension.md

Workflow part-aware dimension

docs/file-ipc-error-model.md

Mã lỗi File IPC

docs/file-ipc-manual-test.md

Kiểm thử tay IPC

docs/phase2-remote-policy.md

Remote allowlist / path guard

docs/phase4-oauth.md

OAuth production + ChatGPT

docs/ke-hoach-chatgpt-http-bridge.md

Kế hoạch HTTP bridge tổng thể

docs/phase0-baseline.md

Baseline phase 0


What's included (current)

  • 8 tool MCP thống nhất, operation dispatch

  • Dual backend: File IPC + ezdxf

  • Dual transport: stdio + Streamable HTTP

  • Remote policy (dev No-Auth allowlist, production OAuth scopes)

  • ChatGPT path: OAuth MCP + Cloudflare named tunnel helpers (start_cloudflare_tunnel.bat)

  • Part-aware auto-dimension: detect → plan → commit / one-shot / audit-repair

  • File IPC reliability: session/request IDs, structured error_code, per-document dispatcher probe

  • system.tool_manifest / runtime / health diagnostics

  • execute_lisp cho automation mở rộng (local only)

  • Wheel packaging kèm lisp-code (hatchling force-include)


License

MIT

Available Tools

9 tools
annotationA

Annotation: text, dimensions, leaders, and automatic dimension workflows.

Operations: create_text — data: {x, y, text, height?, rotation?, layer?} create_dimension_linear — data: {x1, y1, x2, y2, dim_x, dim_y} create_dimension_aligned — data: {x1, y1, x2, y2, offset} create_dimension_angular — data: {cx, cy, x1, y1, x2, y2} create_dimension_radius — data: {cx, cy, radius, angle} create_leader — data: {points: [[x,y],...], text} detect_parts — read-only geometry clustering; data: {source_layers?, gap_tolerance?, include_screenshot?} plan_dimensions — preview a plan without editing; data: {target_part_id?, entity_ids?, region?, region_mode?, selection?, use_current_selection?, source_layers?, profile?, dimension_layer?, include_overall?, include_features?, include_holes?, include_arcs?, include_centers?, clear_existing?} commit_dimension_plan — commit an approved plan; data: {plan_id, expected_revision, ...} auto_dimension — detect, plan, and commit in one request. It accepts target_part_id, entity_ids, region, region_mode, selection='current' or use_current_selection, source_layers, dimension_layer, profile, include_overall, include_features, include_holes, include_arcs, include_centers, clear_existing, include_screenshot. batch_create_dimensions — commit data.dimensions in one request, one Undo group, and one final Regen where the backend supports it. dimension_profiles — data: {action: list|get|save|delete, ...} audit_dimensions — read-only dimension quality audit; data: {profile?, dimension_layer?, include_screenshot?} repair_dimension_layout — apply a fresh audit's safe repairs; data: {audit_id, issue_ids?, spacing?}

Automatic-dimension selectors are mutually exclusive: target_part_id, entity_ids, region, or selection='current'. Dimension results include created_count, dimension_types, selection_scope, scan counters, commit_engine, regen_count, and timings_ms when the backend can provide those values.

Performance rule: when two or more dimensions are needed, use annotation_batch_create_dimensions or annotation_auto_dimension once. Do not call create_dimension_* repeatedly.

Performance rule: pass region, entity_ids, or selection='current' whenever possible. After annotation_detect_parts, reuse geometry_cache_token together with target_part_id so the same full drawing is not exported twice.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
operationYes
include_screenshotNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

The description identifies read-only sub-operations (detect_parts, audit_dimensions) and mentions behavior like undo groups and regen for batch operations. Beyond the annotations (readOnlyHint=false), it adds context but does not fully disclose error states, permission requirements, or the full scope of effects, especially for commit operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a bullet list of operations, which aids scanning. However, it is quite long and includes repetitive performance rules at the end. Some information could be condensed without loss of clarity.

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

Completeness3/5

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

Given the complexity of the tool (many operations) and minimal schema, the description covers the main operations and provides performance rules. However, it omits how output schema looks, error handling, and the relationship to sibling tools. It is adequate but not fully comprehensive.

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?

With the input schema having 0% parameter description coverage, the description compensates by listing expected data keys for each operation (e.g., create_text expects x, y, text, etc.). This adds significant meaning beyond the generic schema. Some operations are vaguely defined (e.g., dimension_profiles has 'action' but no details), so it's not perfect.

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?

The description clearly states the tool's domain—text, dimensions, leaders, and automatic dimension workflows. It lists multiple specific operations, making the purpose evident. However, it does not differentiate this parent tool from sibling tools that seem to provide the same sub-operations directly, which could cause confusion.

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

Usage Guidelines4/5

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

The description includes explicit performance rules (e.g., use batch or auto_dimension for multiple dimensions, pass region when possible) and notes mutual exclusivity of selection parameters. These provide actionable guidance for efficient tool use. However, it lacks guidance on when to use this parent tool versus the sibling tools.

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

annotation_audit_dimensionsA
Read-onlyIdempotent

Find duplicates, overlap, crossings, missing intent, detached refs and style errors.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
include_previewNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety and idempotency. The description adds that the tool finds specific quality issues, which is consistent and provides useful output context.

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 a single 14-word sentence that efficiently lists all audit categories without extraneous text. It is front-loaded and concise.

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

Completeness3/5

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

Given the tool's complexity (auditing with multiple issue types) and the presence of an output schema, the description adequately conveys the purpose but lacks context about the input 'data' parameter and how to interpret results.

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

Parameters1/5

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

Schema description coverage is 0%, meaning no parameter descriptions exist. The tool description does not mention or explain the 'data' or 'include_preview' parameters, leaving the agent with no semantic guidance beyond parameter names.

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 explicitly lists six distinct types of issues (duplicates, overlap, crossings, missing intent, detached refs, style errors), clearly stating what the tool does. It distinguishes itself from sibling tools that create, plan, or repair dimensions.

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?

The description offers no explicit guidance on when to use this tool versus alternatives like annotation_auto_dimension or annotation_repair_dimension_layout. The usage context is implied but not stated.

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

annotation_auto_dimensionA
Destructive

Plan and immediately commit dimensions for one selected part/region/entity set.

Performance rule: when two or more dimensions are needed, use annotation_batch_create_dimensions or annotation_auto_dimension once. Do not call create_dimension_* repeatedly.

Performance rule: pass region, entity_ids, or selection='current' whenever possible. After annotation_detect_parts, reuse geometry_cache_token together with target_part_id so the same full drawing is not exported twice.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
include_screenshotNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

Annotations include destructiveHint=true, but the description does not elaborate on destructive behavior. It adds some context (performance rules) but does not explain side effects or state changes beyond annotations. No contradiction.

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?

Extremely concise: two sentences for core purpose and two performance rules. No redundancy, every sentence adds value.

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

Completeness2/5

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

Despite having output schema and annotations, the description fails to explain the input parameters ('data', 'include_screenshot') or how to construct them. The catch-all 'data' parameter is left ambiguous, making the tool less usable.

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

Parameters1/5

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

Schema description coverage is 0% for the two parameters ('data', 'include_screenshot'). The description references parameters like 'region', 'entity_ids', 'selection' that are not in the schema, and does not explain the actual parameters, leaving the agent uninformed.

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 explicitly states the tool's action ('plan and immediately commit dimensions') and resource ('one selected part/region/entity set'). It also distinguishes from sibling tools like annotation_batch_create_dimensions and annotation_plan_dimensions.

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 clear performance rules: when to use batch vs single, and how to optimize by passing region/entity_ids/selection and reusing geometry_cache_token after detect_parts. Explicitly states to avoid calling create_dimension_* repeatedly.

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

annotation_batch_create_dimensionsA
Destructive

Create two or more dimensions in one request and one Undo group.

Use this instead of repeatedly calling annotation.create_dimension_*. data.dimensions accepts linear, diameter, radius, center, and text items in either plan-shaped form (geometry/placement) or compact coordinate form.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
include_screenshotNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

Annotations already mark it as destructive (destructiveHint: true) and non-readonly. The description adds context: batch creation in one Undo group and accepted dimension types/forms. No contradictions, but it doesn't cover failure modes or authorization needs, so a 3 is appropriate.

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?

Two succinct sentences: first states the core function, second provides usage guidance and parameter hints. No redundant words; every sentence earns its place.

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

Completeness4/5

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

Given the tool complexity (nested objects, output schema exists), the description covers creation purpose, batch nature, and dimension types. It lacks details on output or structure, but output schema likely fills gaps. Sibling context is minimal but sufficient.

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

Parameters3/5

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

Schema coverage is 0%, so description must compensate. It explains that data.dimensions accepts specific types (linear, diameter, etc.) in two forms, which adds value. However, it does not detail the object structure or include_screenshot semantics, so it is only partially helpful.

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 purpose: 'Create two or more dimensions in one request and one Undo group.' It specifies the verb (create), resource (dimensions), and distinguishes from siblings by emphasizing batch creation and Undo group atomicity.

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

Usage Guidelines4/5

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

The description explicitly advises: 'Use this instead of repeatedly calling annotation.create_dimension_*.' This provides clear when-to-use guidance. It implies not to use for single dimensions but does not list all alternatives; a bit more explicit exclusion would earn a 5.

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

annotation_detect_partsA
Read-onlyIdempotent

Cluster Model Space geometry and return part_1, part_2... with an indexed preview.

Performance rule: pass region, entity_ids, or selection='current' whenever possible. After annotation_detect_parts, reuse geometry_cache_token together with target_part_id so the same full drawing is not exported twice.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
include_previewNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the description adds value by explaining clustering, return format (part_1, part_2...), and cache reuse behavior. No contradictions.

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?

Two sentences with zero fluff: first sentence defines purpose, second provides critical performance guidance. Every word earns its place.

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

Completeness3/5

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

The description covers core functionality and performance rules, but omits parameter semantics and lacks detail on what the indexed preview includes. Output schema exists, so return values are documented elsewhere, but parameter info is missing.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not mention any parameter (data, include_preview). It fails to add meaning beyond the schema, leaving users to infer purpose and constraints of the two parameters.

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 'Cluster Model Space geometry and return part_1, part_2... with an indexed preview', specifying the verb (cluster and return) and resource (independent drawing parts). This distinguishes it from sibling tools like annotation_audit_dimensions or drawing, which have different purposes.

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

Usage Guidelines4/5

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

Provides explicit performance rules: 'pass region, entity_ids, or selection='current' whenever possible' and 'reuse geometry_cache_token together with target_part_id...'. While no explicit when-not-to-use or alternatives, the guidance on efficient use is clear and actionable.

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

annotation_plan_dimensionsD
Read-only

Create or revise a D1/D2... plan; no AutoCAD entity is created.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
include_previewNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

D1.9/5.0
Behavior1/5

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

The description claims 'Create or revise' which implies mutation, but annotations declare readOnlyHint=true, a direct contradiction. This undermines transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one sentence but too vague to be effective. It fails to convey essential information concisely.

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

Completeness2/5

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

With 0% schema coverage, no parameter explanations, and a contradictory description, the tool definition is incomplete for an agent to use correctly.

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

Parameters1/5

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

Schema coverage is 0%. The description does not explain the 'data' or 'include_preview' parameters, leaving the agent without meaningful guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states it creates or revises a plan and explicitly says no AutoCAD entity is created, but 'D1/D2... plan' is vague. It somewhat distinguishes from siblings that deal with dimensions.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like annotation_auto_dimension or annotation_batch_create_dimensions.

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

annotation_repair_dimension_layoutC
Destructive

Remove duplicates and fix safe layer/style/lane issues from a fresh audit.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
include_screenshotNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

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

The description aligns with the destructiveHint annotation by mentioning removal and fixing. However, it adds no additional behavioral details such as what exactly gets destroyed, required permissions, or rate limits. The title provides some context but is not part of the description.

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 a single concise sentence with no unnecessary words or repetition. It is appropriately front-loaded.

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

Completeness2/5

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

Given that the tool has an output schema, no required parameters, and a destructive hint, the description is too sparse. It does not explain what kind of data is expected, how the screenshot parameter affects behavior, or what the output looks like. The title and annotations provide some context, but the description itself is incomplete.

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

Parameters1/5

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

The description provides no information about the parameters (data, include_screenshot). With 0% schema description coverage, the description fails to add any meaning beyond the bare schema structure.

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?

The description clearly states the tool's purpose: removing duplicates and fixing issues related to safe layer/style/lane from a fresh audit. However, it does not differentiate itself from sibling tools like annotation_audit_dimensions or annotation_plan_dimensions, which might also deal with layout issues.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The phrase 'from a fresh audit' implies it is used after an audit, but this is not explicit, and there is no mention of when not to use it.

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

drawingA

Drawing file management.

Operations: create — Create a new empty drawing. data: {name?} open — Open an existing drawing. data: {path} info — Get drawing extents, entity count, layers, blocks. save — Save current drawing. data: {path?} (saves to path if given, else QSAVE) save_as_dxf — Export as DXF. data: {path} plot_pdf — Plot to PDF. data: {path} purge — Purge unused objects. get_variables — Get system variables. data: {names: [...]} undo — Undo last operation. redo — Redo last undone operation.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
operationYes
include_screenshotNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

With readOnlyHint=false, the tool is already marked as potentially mutating, and the description adds meaningful behavioral details: save mentions QSAVE fallback, undo/redo state operations, and purge targets unused objects. It does not disclose destructive side effects (e.g., purge deleting data permanently), but the per-operation explanations go well beyond the bare annotation.

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 a tightly formatted bullet list with no filler. Each line adds one distinct operation plus a brief explanation and data hint, and the overall purpose is front-loaded in the first line.

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

Completeness4/5

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

For a ten-operation dispatcher, the description covers each operation's function and relevant data requirements, and an output schema exists to cover return values. The main gap is the unexplained `include_screenshot` parameter, which prevents the description from being fully complete.

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 description coverage is 0%, so the description is the only documentation of valid `operation` values and `data` structures. It lists all operations and gives per-operation data hints such as `data: {path}` for open and `data: {names: [...]}` for get_variables. However, the `include_screenshot` parameter is never mentioned, leaving one parameter undocumented.

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 opens with "Drawing file management" and then enumerates ten distinct operations, each with a verb and a resource (e.g., "create — Create a new empty drawing," "plot_pdf — Plot to PDF"). This makes the dispatcher's purpose and each subcommand unambiguous. Although sibling tools are not referenced, the operations are clearly scoped to whole-drawing management, distinguishing it from entity/layer/block tools.

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?

The operation list implicitly tells an agent when to use this tool (e.g., when saving or opening a drawing), but there are no explicit when-not-to-use statements or pointers to siblings like entity, layer, or block. Usage context is conveyed indirectly through the operation names, not through explicit routing guidance.

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

pidA

P&ID drawing with CTO symbol library.

Operations: setup_layers — Create standard P&ID layers. insert_symbol — data: {category, symbol, x, y, scale?, rotation?} list_symbols — data: {category} draw_process_line — data: {x1, y1, x2, y2} connect_equipment — data: {x1, y1, x2, y2} add_flow_arrow — data: {x, y, rotation?} add_equipment_tag — data: {x, y, tag, description?} add_line_number — data: {x, y, line_num, spec} insert_valve — data: {x, y, valve_type, rotation?, attributes?} insert_instrument — data: {x, y, instrument_type, rotation?, tag_id?, range_value?} insert_pump — data: {x, y, pump_type, rotation?, attributes?} insert_tank — data: {x, y, tank_type, scale?, attributes?}

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo
operationYes
include_screenshotNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

The description reveals that operations mutate the drawing by creating layers, inserting symbols, and connecting equipment, which is consistent with the readOnlyHint=false annotation. It does not disclose prerequisites such as whether setup_layers must be called first, coordinate system expectations, or the effect of include_screenshot. It adds operation-level behavior but not deeper behavioral context.

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 a tight, consistently formatted operation list with no filler. The domain statement is front-loaded, and every line adds a distinct operation or data shape. It is an excellent model of concise reference documentation.

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

Completeness4/5

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

For a multi-operation dispatch tool, the description covers all operation names and their data payloads, and an output schema exists so return-value documentation is not essential. It is slightly incomplete around the include_screenshot parameter and setup ordering, but otherwise sufficient for correct invocation.

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 description coverage is 0%, but the description lists the expected data keys for each operation, including optional fields marked with '?'. This substantially compensates for the generic schema. The only structured parameter not explained is include_screenshot, which prevents a 5.

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?

The opening phrase 'P&ID drawing with CTO symbol library' plus the enumerated operations (setup_layers, insert_symbol, draw_process_line, etc.) makes the tool's purpose concrete. It stops short of a clean single verb+resource statement and does not explicitly contrast with sibling drawing/layer tools, so it earns 4 rather than 5.

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?

The operation list implies when to use this tool, such as when inserting P&ID symbols or drawing process lines. However, it never explicitly states when to prefer this tool over sibling tools like drawing, layer, or block, and it gives no exclusions. 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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv3.0.0
    • First observedannotation
    • First observedannotation_audit_dimensions
    • First observedannotation_auto_dimension
    • First observedannotation_batch_create_dimensions
    • First observedannotation_detect_parts
    • First observedannotation_plan_dimensions
    • First observedannotation_repair_dimension_layout
    • First observeddrawing
    • First observedpid

TDQS

B3/5.0

Scored across 9 tools

Disambiguation4/5

Tools are mostly distinct, with annotation covering text/leaders/dimensions and specialized tools for audit, auto, batch, plan, and repair. Some overlap exists between individual dimension creation in annotation and the batch/auto tools, but performance rules help disambiguate.

Naming Consistency4/5

All tools use snake_case, and annotation-related tools share an 'annotation_' prefix. However, patterns vary (e.g., detect_parts vs. auto_dimension), though still readable.

Tool Count5/5

9 tools is well-scoped for a CAD server covering drawing management, annotation, and P&ID. Each tool has clear purpose without redundancy.

Completeness2/5

Significant gaps: no tools for basic geometry creation (lines, circles), general editing, or layer management. The server is heavily biased toward dimensions and P&ID, missing fundamental CAD operations.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Production-grade AutoCAD automation server enabling real-time CAD control via COM and headless DXF operations through 87 tools, including drawing creation, entity modification, layer management, and batch processing, designed for AI agent integration via the Model Context Protocol.
    2
    100
    443 PyPI
    83
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables natural-language control of AutoCAD LT for automation and headless DXF generation, supporting drawing, entity, layer, block, annotation, P&ID, and system operations via an MCP interface.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for AutoCAD LT automation and headless DXF generation, exposing tools for drawing, entities, layers, blocks, annotations, P&ID, and view operations via natural language.
    8
    MIT