Skip to content
Agentmart
Submit a tool

best-cad-mcp

Windows AutoCAD MCP server for handle-first CAD automation, validation, and drawing exports.

Connector by LokmenoWer · GitHub account verified by the MCP Registry

IndexedMITLocal (stdio)★ 33
Write a review

Chalk Labs

Need help deploying best-cad-mcp?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.

npx agentmarket install connector/lokmenower-best-cad-mcp

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Windows AutoCAD MCP server for handle-first CAD automation, validation, and drawing exports.

Use cases: ui-design, document-processing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
124 read · 184 write · 16 delete
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Tools by what they do 324

Read from the source code; the running server may list different tools.

Read 124 · Look things up without changing anything.

  • analyze_drawing_intent
  • analyze_engineering_drawing_stages
  • angle_from_xaxis
  • angle_to_real
  • angle_to_string
  • audit_drawing
  • bind_all_dimensions
  • bind_dimension_to_geometry
  • build_drawing_ir
  • check_interference
  • check_runtime_environment
  • compile_image_spec_to_cad_plan
Show 112 more tools
  • distance_to_real
  • dry_run_cad_plan
  • evaluate_vlm_grounding
  • execute_query
  • execute_sql_query
  • explain_entity
  • export_drawing_ir
  • export_view_image
  • find_entities_by_description
  • find_semantic_objects
  • get_active_space_info
  • get_active_ucs
  • get_all_blocks
  • get_all_groups
  • get_all_layers
  • get_all_tables
  • get_all_ucs
  • get_application_info
  • get_block_attributes
  • get_bounding_box
  • get_cad_resource
  • get_current_selection
  • get_current_view
  • get_database_maintenance_status
  • get_dictionaries
  • get_dimension_measurement
  • get_dimension_styles
  • get_document_info
  • get_drawing_constraints
  • get_entity_properties
  • get_entity_statistics
  • get_entity_topology
  • get_extension_dictionary
  • get_file_dependencies
  • get_hyperlinks
  • get_layouts
  • get_legacy_database_status
  • get_linetypes
  • get_materials
  • get_named_views
  • get_plot_configurations
  • get_plot_devices
  • get_plot_style_tables
  • get_preference
  • get_preferences_display
  • get_preferences_drafting
  • get_preferences_files
  • get_preferences_opensave
  • get_preferences_selection
  • get_preferences_system
  • get_preferences_user
  • get_registered_applications
  • get_semantic_graph
  • get_snapshot_image
  • get_snapshots
  • get_table_schema
  • get_text_styles
  • get_tool_help
  • get_topology_summary
  • get_trace_source_image
  • get_validation_report
  • get_variable
  • get_viewports
  • get_visible_entities_in_view
  • get_vision_capabilities
  • get_vlm_findings
  • get_workspace_context
  • get_xdata
  • get_xrefs
  • ground_vlm_overlay_id
  • ground_vlm_region
  • hatch_get_properties
  • highlight_query_results
  • intersect_with
  • is_autocad_idle
  • list_cad_resources
  • list_spatial_annotations
  • list_workspace_drawings
  • map_pixel_region_to_world_bbox
  • map_pixel_to_world
  • map_world_to_pixel
  • measure_distance
  • measure_entity
  • open_drawing
  • pan
  • plot_preview
  • polar_point
  • polyline_get_bulge
  • polyline_get_point_at_param
  • polyline_get_segment_type
  • polyline_get_width
  • polyline_num_vertices
  • prepare_visual_semantic_context
  • propose_constraint_repair_plan
  • propose_repair_plan
  • real_to_string
  • recommend_cad_tools
  • regen
  • scan_all_entities
  • scan_entities_in_area
  • summarize_drawing
  • translate_coordinates
  • validate_cad_plan
  • validate_image_drawing_spec
  • validate_image_fidelity_contract
  • validate_vlm_review_output
  • view_image
  • zoom_all
  • zoom_center
  • zoom_extents
  • zoom_previous
  • zoom_window

Write 184 · Create, change, send or run things.

  • activate_workspace_drawing
  • add_3point_angular_dimension
  • add_angular_dimension
  • add_arc_dimension
  • add_baseline_dimension
  • add_continue_dimension
  • add_diametric_dimension
  • add_hatch
  • add_hyperlink
  • add_leader
  • add_linear_dimension
  • add_mleader
Show 172 more tools
  • add_ordinate_dimension
  • add_qdim
  • add_radial_dimension
  • add_region
  • add_rotated_dimension
  • add_shape
  • add_spatial_annotation
  • add_table
  • add_viewport
  • align_entities
  • array_polar
  • array_rectangular
  • attach_xref
  • begin_undo_group
  • break_entity
  • chamfer_entities
  • chamfer_polyline
  • check_drawing_constraints
  • close_drawing
  • copy_dimension_style
  • copy_entity
  • create_block
  • create_group
  • create_layer
  • create_layout
  • create_material
  • create_new_drawing
  • create_registered_application
  • create_snapshot
  • create_text_style
  • create_ucs
  • detect_semantic_objects
  • divide_entity
  • draw_2d_solid
  • draw_3d_face
  • draw_3d_mesh
  • draw_3d_polyline
  • draw_arc
  • draw_box
  • draw_circle
  • draw_cone
  • draw_cylinder
  • draw_donut
  • draw_ellipse
  • draw_ellipse_arc
  • draw_elliptical_cone
  • draw_elliptical_cylinder
  • draw_line
  • draw_mline
  • draw_mtext
  • draw_point
  • draw_polyface_mesh
  • draw_polygon
  • draw_polyline
  • draw_raster_image
  • draw_ray
  • draw_rectangle
  • draw_sphere
  • draw_spline
  • draw_text
  • draw_tolerance
  • draw_torus
  • draw_trace
  • draw_wedge
  • draw_wipeout
  • draw_xline
  • edit_table_cell
  • end_undo_group
  • explode_block
  • explode_entity
  • export_dwf
  • export_dxf
  • export_image
  • export_pdf
  • export_view_image_with_mapping
  • extend_entity
  • extract_drawing_constraints
  • extrude_region
  • extrude_region_along_path
  • fillet_entities
  • fillet_polyline
  • find_text
  • format_table
  • freeze_layer
  • fuse_vlm_findings_into_semantic_graph
  • hatch_add_boundary
  • hatch_add_inner_loop
  • hatch_set_gradient
  • hatch_set_properties
  • highlight_entities
  • highlight_entity
  • import_dxf
  • insert_block
  • insert_block_with_attributes
  • insert_minsert_block
  • isolate_layer
  • join_entities
  • lengthen_entity
  • load_linetype
  • lock_layer
  • mirror_3d
  • mirror_entity
  • move_entity
  • offset_entity
  • plot_to_device
  • plot_to_file
  • polyline_add_vertex
  • polyline_constant_width
  • polyline_set_bulge
  • polyline_set_width
  • prepare_image_trace
  • promote_vlm_finding_to_validation_issue
  • redo
  • reload_xref
  • rename_layer
  • render_drawing_view
  • replace_text
  • restart_mcp
  • restore_named_view
  • revolve_region
  • rotate_3d
  • rotate_entity
  • save_drawing
  • save_named_view
  • scale_entity
  • section_solid
  • select_all
  • select_at_point
  • select_by_cpolygon
  • select_by_crossing
  • select_by_fence
  • select_by_window
  • select_by_wpolygon
  • select_on_screen
  • set_active_layout
  • set_active_material
  • set_active_ucs
  • set_block_attribute
  • set_current_dimension_style
  • set_current_layer
  • set_current_text_style
  • set_dimension_text_override
  • set_document_properties
  • set_drawing_password
  • set_entity_material
  • set_entity_plot_style
  • set_entity_properties
  • set_entity_transparency
  • set_entity_truecolor
  • set_preference
  • set_text_alignment
  • set_text_properties
  • set_variable
  • set_viewport_properties
  • set_workspace_context
  • set_xdata
  • slice_solid
  • solid_boolean
  • stretch_entities
  • submit_image_drawing_spec
  • submit_vlm_review
  • thaw_layer
  • transform_entity
  • trim_entity
  • turn_off_layer
  • turn_on_layer
  • undo
  • unisolate_layers
  • unload_xref
  • unlock_layer
  • validate_geometry
  • zoom_scale

Delete 16 · Delete, drop, revoke or wipe things.

  • clear_selection_set
  • clear_spatial_annotations
  • clear_understanding_cache
  • delete_entities
  • delete_entity
  • delete_layer
  • delete_named_view
  • delete_selection_set
  • erase_selection_entities
  • execute_cad_plan
  • maintain_database
  • purge_drawing
Show 4 more tools
  • remove_hyperlink
  • reset_entity_color
  • rollback_undo_group
  • send_command

Secrets and settings it asks for

Other settings (environment variables or headers).

  • CAD_MCP_WORKSPACE_ROOT

Network hosts it talks to 2

  • github.com · found in code
  • json.schemastore.org · found in code

Files it touches

  • C:\\Users\\qxqxx\\workspace\\best-cad-mcp\\.venv\\Scripts\\python.exe
  • C:\\Users\\qxqxx\\workspace\\best-cad-mcp\\docs\\artifacts\\readme-real-cad
  • C:\\Users\\qxqxx\\workspace\\best-cad-mcp\\docs\\images\\readme-cad-real.png
  • Any path the agent passes to its tools

Tools (324)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • activate_workspace_drawing

    Switch metadata reads and writes to a drawing inside the current workspace.

  • add_3point_angular_dimension

    添加三点角度标注(通过三个点定义角度)。 不需要圆心参数,直接通过三个点定义夹角。 Args: vertex_x, vertex_y: 角度顶点 ref1_x, ref1_y: 第一条参照线的端点 ref2_x, ref2_y: 第二条参照线的端点 text_x, text_y: 标注文字位置 layer: 图层名称

  • add_angular_dimension

    添加角度标注(测量并显示两条线之间的角度)。 Args: center_x, center_y: 角的顶点坐标 x1, y1: 第一条边上的任意点 x2, y2: 第二条边上的任意点 text_x, text_y: 标注文字位置 layer: 图层名称

  • add_arc_dimension

    添加弧长标注(标注圆弧的弧长)。 弧长标注在圆弧上方显示弧长值和小弧符号。 Args: center_x, center_y: 圆心坐标 start_x, start_y: 圆弧起点 end_x, end_y: 圆弧终点 text_x, text_y: 标注文字位置 layer: 图层名称

  • add_baseline_dimension

    添加基线标注(从上一个标注的公共基线延伸)。 使用前提:必须先有一个线性标注作为基准标注。 所有后续基线标注共享基准标注的第一条尺寸界线。 Args: x, y, z: 下一个标注的第二个测量点(基准标注的起点为公共基线) layer: 图层名称

  • add_continue_dimension

    添加连续标注(首尾相接的尺寸链)。 使用前提:必须先有一个线性标注作为起始标注。 每个后续标注以上一个标注的终点为起点,形成尺寸链。 Args: x, y, z: 下一个标注的第二个测量点 layer: 图层名称

  • add_diametric_dimension

    添加直径标注(用于标注圆的直径)。 标注文字会自动添加 ⌀ 前缀。 Args: chord1_x, chord1_y: 直径的一个端点(圆周上) chord2_x, chord2_y: 直径的另一个端点(对面的圆周上) leader_length: 引线长度(0=自动) layer: 图层名称

  • add_hatch

    Description is built at runtime.

  • add_hyperlink

    为实体添加超链接。 可以链接到网页、本地文件或图纸中的命名视图。 Args: handle: 实体句柄 url: 链接URL(网页地址或本地文件路径) description: 链接描述文字(鼠标悬停时显示) named_location: 目标中的命名位置(可选)

  • add_leader

    绘制引线标注(带箭头的指引线 + 可选文字注释)。 引线通常用于指向图形中的特定位置并添加说明文字。 Args: points: 引线顶点列表 [x1,y1,z1, x2,y2,z2, ...] 或 [[x,y,z], ...],至少2个点 最后一个点是箭头指向的位置 annotation: 引线末端注释文字(可选) layer: 图层名称

  • add_linear_dimension

    Description is built at runtime.

  • add_mleader

    Description is built at runtime.

  • add_ordinate_dimension

    添加坐标标注(显示 X 或 Y 坐标值)。 用于标注点的绝对坐标位置,常用于加工图纸。 Args: x, y: 要标注的点坐标 leader_end_x, leader_end_y: 引线终点(标注文字位置) use_x_axis: True=标注X坐标, False=标注Y坐标 layer: 图层名称

  • add_qdim

    Description is built at runtime.

  • add_radial_dimension

    添加半径标注(用于标注圆弧或圆的半径)。 标注文字会自动添加 R 前缀。 Args: center_x, center_y: 圆心坐标 chord_x, chord_y: 圆弧上的标注点 leader_length: 引线长度(0=自动) layer: 图层名称

Show 309 more tools
  • add_region

    将闭合曲线转换为面域对象。 面域是二维封闭区域,可用于拉伸、旋转生成三维实体。 原始曲线会被删除。 Args: entity_handles: 闭合曲线的实体句柄列表(圆、封闭多段线、椭圆等) layer: 图层名称

  • add_rotated_dimension

    添加旋转线性标注(可指定标注方向)。 适用于标注斜向距离。 Args: x1, y1: 第一个测量点 x2, y2: 第二个测量点 text_x, text_y: 标注文字位置 rotation: 标注线的旋转角度(度) layer: 图层名称

  • add_shape

    绘制形 (Shape) — 从 .shx 形状文件中插入预定义图形。 需要先用 LOAD 命令加载对应的 .shx 形状文件。 形文件是编译过的轻量级符号库。 Args: shape_name: 形状名称(必须在已加载的.shx文件中定义) x, y, z: 插入点坐标 scale: 缩放比例 rotation: 旋转角度(度) layer: 图层名称 color: 颜色

  • add_spatial_annotation

    Description is built at runtime.

  • add_table

    Description is built at runtime.

  • add_viewport

    在图纸空间布局中创建视口。 视口用于在布局中显示模型空间的内容,可设置不同的比例和视角。 Args: center_x, center_y: 视口中心点(图纸空间坐标) width: 视口宽度 height: 视口高度 layer: 图层名称

  • align_entities

    对齐实体。通过成对的源点和目标点集移动、旋转实体的二维或三维操作。 如果是两对点,执行 2D 对齐(平移+旋转+缩放)。 如果是三对点,执行 3D 对齐。 Args: handles: 需要对齐的实体句柄列表 points: 对齐点对。格式为 [[源点1, 目标点1], [源点2, 目标点2], ...]

  • analyze_drawing_intentread-only

    Infer likely CAD drawing domain from scanned metadata.

  • analyze_engineering_drawing_stagesread-only

    Build layout, annotation, VLM, and reconciliation stages as JSON.

  • angle_from_xaxis

    计算两点连线与X轴之间的夹角。 Args: x1,y1,z1: 第一个点 x2,y2,z2: 第二个点

  • angle_to_real

    将角度字符串解析为弧度值。 单位: 0=十进制度, 1=度/分/秒, 2=百分度(grads), 3=弧度 Args: angle_str: 角度字符串(如 "45.5", "45d30'0"") unit: 角度单位

  • angle_to_string

    将弧度角度格式化为指定单位的字符串。 Args: angle_rad: 角度值(弧度) unit: 单位: 0=十进制度, 1=度/分/秒, 2=百分度, 3=弧度 precision: 精度位数

  • array_polar

    Description is built at runtime.

  • array_rectangular

    Description is built at runtime.

  • attach_xref

    附加外部参照 (Xref):将另一个 DWG 文件链接到当前图纸。 外部参照文件独立存在,修改源文件会自动更新所有引用它的图纸。 Args: filepath: 外部参照文件(.dwg)的完整路径 insert_x, insert_y, insert_z: 插入点坐标 scale: 缩放比例 rotation: 旋转角度(度) layer: 图层名称

  • audit_drawing

    审计并修复当前图纸中的错误。

  • begin_undo_group

    Begin an AutoCAD undo group for transactional CADPlan execution.

  • bind_all_dimensionsread-only

    Bind all scanned dimension annotations to likely measured geometry.

  • bind_dimension_to_geometryread-only

    Bind one scanned dimension annotation to likely measured geometry.

  • break_entity

    在指定点处打断实体(将实体一分为二)。 如果只指定一个点,则在该点处将实体分为两部分。 如果指定两个点,则移除两点之间的部分。 Args: handle: 实体句柄 point1_x,y,z: 第一个打断点 point2_x,y,z: 第二个打断点(可选,省略则在同一点打断)

  • build_drawing_irread-only

    Build CAD-IR v2 from scanned metadata, with optional section filtering.

  • chamfer_entities

    对两个实体执行倒角(斜角连接)。 在两条线的交点处创建指定距离的斜角边。 Args: handle1: 第一个实体句柄 handle2: 第二个实体句柄 distance1: 第一条边的倒角距离 distance2: 第二条边的倒角距离

  • chamfer_polyline

    Description is built at runtime.

  • check_drawing_constraints

    Check extracted constraints without modifying the DWG.

  • check_interference

    检查两个三维实体是否干涉(相交/碰撞)。 可用于检查零件装配干涉、碰撞检测等。 Args: handle1: 第一个实体句柄 handle2: 第二个实体句柄 create_solid: 是否创建干涉体(True=创建相交部分的实体)

  • check_runtime_environmentread-only

    Description is built at runtime.

  • clear_selection_set

    Description is built at runtime.

  • clear_spatial_annotations

    Description is built at runtime.

  • clear_understanding_cache

    Clear semantic/constraint/validation/view caches for the active thread.

  • close_drawing

    关闭当前图纸。 Args: save: 关闭前是否保存

  • compile_image_spec_to_cad_planread-only

    Compile ImageDrawingSpec/v1 to a guarded CADPlan without modifying DWG.

  • copy_dimension_style

    复制标注样式。基于现有样式创建新的标注样式。 Args: source_name: 源样式名称 new_name: 新样式名称

  • copy_entity

    Description is built at runtime.

  • create_block

    Description is built at runtime.

  • create_group

    创建实体组(将多个实体编组为一个可整体操作的组)。 组的优势:可以一次性选择/编辑组内所有实体,但每个实体仍保持独立。 Args: name: 组名称(建议有意义的名称) handles: 要包含在组中的实体句柄列表

  • create_layer

    创建新图层或修改已有图层的颜色。 图层是 CAD 组织图形的基本单位。创建图层后,绘图工具可指定 layer 参数。 Args: name: 图层名称(建议使用有意义的名称,如 WALL, DOOR, DIM) color: 颜色索引 (1=红,2=黄,3=绿,4=青,5=蓝,6=洋红,7=白/黑) linetype: 线型名称 (Continuous, Dashed, Center, Hidden, Phantom, Divide, Border)

  • create_layout

    创建新的图纸空间布局(用于打印/出图设置)。 Args: name: 新布局名称

  • create_material

    创建新的渲染材质。 Args: name: 材质名称(如 "不锈钢", "木材") description: 材质描述

  • create_new_drawing

    创建新的 AutoCAD 图纸。 这是开始任何 CAD 工作的第一步。创建空白图纸后,可以开始绘制实体。 Args: template: 模板文件(.dwt)路径。为None则使用默认模板(acad.dwt)

  • create_registered_application

    注册新的应用名称(用于存储扩展数据 XData)。 Args: name: 应用名称(如 "MY_AI_METADATA", "PROJECT_DATA")

  • create_snapshot

    创建当前图纸状态的快照(保存到数据库用于追踪变化)。 可以在不同时间点创建多个快照,然后对比。 Args: name: 快照名称(可选,默认使用图纸文件名)

  • create_text_style

    创建文字样式(定义字体和默认属性)。 Args: name: 样式名称(如 "标题", "标注") font: 字体名称 (Arial, SimSun/宋体, SimHei/黑体, Romans, txt.shx) height: 默认文字高度(0=每次提示输入高度, 正数=固定高度) width: 宽度因子(1=正常宽度, <1=窄体, >1=宽体)

  • create_ucs

    创建命名用户坐标系 (UCS)。 UCS 定义自定义坐标系统,用于在3D空间中的特定平面上绘图。 Args: origin_x,y,z: UCS原点(WCS坐标) x_axis_x,y,z: X轴正方向点(定义X轴方向) y_axis_x,y,z: Y轴正方向点(定义Y轴方向) name: UCS名称

  • delete_entities

    批量删除多个实体。 Args: handles: 要删除的实体句柄列表

  • delete_entity

    删除指定实体。 警告:此操作不可撤销(除非使用undo命令)。 Args: handle: 要删除的实体句柄

  • delete_layer

    删除图层。注意:不能删除当前图层、0图层或包含实体的图层。 Args: name: 要删除的图层名称

  • delete_named_view

    删除命名视图。 Args: name: 视图名称

  • delete_selection_setcan change or delete data

    Description is built at runtime.

  • detect_semantic_objects

    Detect rule-based semantic CAD objects and store them in SQLite only.

  • distance_to_real

    将距离字符串解析为实数。 单位: 0=十进制, 1=工程制, 2=建筑制, 3=分数制 Args: dist_str: 距离字符串 unit: 单位

  • divide_entity

    定数等分实体(在实体上按指定段数等分插入点或图块)。 Args: handle: 实体句柄 segments: 等分段数 (2-32767) block_name: (可选)用于标记的块名,留空则插入点对象

  • draw_2d_solid

    绘制二维实体填充面(3或4个顶点的填充区域)。 与 Hatch 填充不同,2D Solid 是轻量级的填充面,适合简单的实心区。 Args: p1_x,y,z: 第一个顶点 p2_x,y,z: 第二个顶点 p3_x,y,z: 第三个顶点 p4_x,y,z: 第四个顶点(可选,省略=三角形填充) layer: 图层名称 color: 颜色

  • draw_3d_face

    绘制三维面(三角形或四边形)。 四个顶点可定义一个四边形面;如果省略第四个顶点则为三角形面。 Args: x1,y1,z1: 第一个顶点 x2,y2,z2: 第二个顶点 x3,y3,z3: 第三个顶点 x4,y4,z4: 第四个顶点(可选,省略则为三角形) layer: 图层名称 color: 颜色

  • draw_3d_mesh

    绘制三维多边形网格 (M×N 顶点网格)。 Args: m_size: M方向顶点数 (2-256) n_size: N方向顶点数 (2-256) vertices: 顶点坐标列表 [x1,y1,z1, x2,y2,z2, ...] 数量 = M×N×3 layer: 图层名称 color: 颜色

  • draw_3d_polyline

    绘制三维多段线(每个顶点可以有不同的Z坐标)。 与 draw_polyline 不同,3D多段线的每个顶点可以独立指定Z坐标。 Args: points: 三维坐标 [x1,y1,z1, x2,y2,z2, ...] 至少6个值(2个点) closed: 是否闭合(True=封闭3D多段线) layer: 图层名称 color: 颜色

  • draw_arc

    在AutoCAD中绘制圆弧。 角度以度为单位,从3点钟方向逆时针计算。 Args: center_x: 圆心 X 坐标 center_y: 圆心 Y 坐标 radius: 半径 start_angle: 起始角度(度),0=3点钟方向 end_angle: 终止角度(度),如180=9点钟方向(半圆) layer: 图层名称 color: 颜色

  • draw_box

    Description is built at runtime.

  • draw_circle

    Description is built at runtime.

  • draw_cone

    在AutoCAD中绘制三维圆锥体。 Args: center_x, center_y, center_z: 底面中心点坐标 base_radius: 底面半径(正数) height: 高度(正数) layer: 图层名称 color: 颜色

  • draw_cylinder

    Description is built at runtime.

  • draw_donut

    绘制圆环(两个同心圆之间的填充区域)。 常用于绘制垫圈、环形构件等。 Args: center_x: 中心 X 坐标 center_y: 中心 Y 坐标 inner_radius: 内圆半径 outer_radius: 外圆半径(必须大于内圆半径) layer: 图层名称 color: 颜色

  • draw_ellipse

    在AutoCAD中绘制椭圆。 Args: center_x: 中心 X 坐标 center_y: 中心 Y 坐标 major_x: 长轴端点 X(相对中心的偏移量) major_y: 长轴端点 Y(相对中心的偏移量) radius_ratio: 短轴/长轴比例 (0~1,如0.5=半高椭圆) layer: 图层名称 color: 颜色

  • draw_ellipse_arc

    Description is built at runtime.

  • draw_elliptical_cone

    在AutoCAD中绘制三维椭圆锥体。 Args: center_x, center_y, center_z: 底面中心 major_radius: 长轴半径(X方向) minor_radius: 短轴半径(Y方向) height: 高度(Z方向) layer: 图层名称 color: 颜色

  • draw_elliptical_cylinder

    在AutoCAD中绘制三维椭圆柱体。 Args: center_x, center_y, center_z: 底面中心 major_radius: 长轴半径 minor_radius: 短轴半径 height: 高度 layer: 图层名称 color: 颜色

  • draw_line

    Description is built at runtime.

  • draw_mline

    Description is built at runtime.

  • draw_mtext

    Description is built at runtime.

  • draw_point

    在AutoCAD中绘制点。 点是最简单的图元,用于标记位置。可以配合 PDMODE 系统变量改变点的显示样式。 Args: x, y, z: 点坐标 layer: 图层名称 color: 颜色

  • draw_polyface_mesh

    绘制多面网格。 Args: vertices: 顶点坐标 [x1,y1,z1, x2,y2,z2, ...] face_list: 面索引列表,每个面4个整数(负值表示不可见边) layer: 图层名称 color: 颜色

  • draw_polygon

    Description is built at runtime.

  • draw_polyline

    Description is built at runtime.

  • draw_raster_image

    在图纸中插入光栅图像(PNG, JPG, BMP, TIFF)。 光栅图像可用作底图参考、LOGO、现场照片等。 Args: filepath: 图像文件完整路径 insert_x, insert_y, insert_z: 插入点坐标 scale: 缩放比例(默认1.0=原始大小) rotation: 旋转角度(度,默认0) layer: 图层名称

  • draw_ray

    绘制射线(从起点向指定方向无限延伸的半直线)。 射线常用于指示方向、构建辅助几何线、投影参照等。 Args: origin_x,y,z: 起点坐标 direction_x,y,z: 方向向量(默认 (1,0,0)=X轴正方向) layer: 图层名称 color: 颜色

  • draw_rectangle

    Description is built at runtime.

  • draw_sphere

    在AutoCAD中绘制三维球体。 Args: center_x, center_y, center_z: 球心坐标 radius: 半径(正数) layer: 图层名称 color: 颜色

  • draw_spline

    Description is built at runtime.

  • draw_text

    Description is built at runtime.

  • draw_tolerance

    绘制几何公差标注(GD&T特征控制框)。 用于标注形状和位置公差:平面度、平行度、垂直度、位置度等。 公差文字格式:如 "{\Fgdt;j}%%v0.05%%vA"。 Args: text: 公差文字(GDT格式) insert_x,y,z: 插入点坐标 direction_x,y,z: 方向向量(控制框朝向) layer: 图层名称 color: 颜色

  • draw_torus

    在AutoCAD中绘制三维圆环体。 Args: center_x, center_y, center_z: 环心坐标 torus_radius: 环半径(中心到管心的距离) tube_radius: 管半径 layer: 图层名称 color: 颜色

  • draw_trace

    绘制宽线 (Trace) — 具有宽度的二维线段。 宽线由4个点定义一条有宽度的线段,是早期 AutoCAD 版本的功能。 点序应为 [x1,y1, x2,y2, x3,y3, x4,y4]。 Args: points: 4个点坐标 [x1,y1, x2,y2, x3,y3, x4,y4] layer: 图层名称 color: 颜色

  • draw_wedge

    在AutoCAD中绘制三维楔形体(楔形块)。 Args: center_x, center_y, center_z: 底面中心点坐标 length: X方向长度 width: Y方向宽度 height: Z方向高度 layer: 图层名称 color: 颜色

  • draw_wipeout

    创建区域覆盖 (Wipeout) — 用空白遮罩覆盖背后对象。 用于在密集图纸中创建清晰的标注空间,或隐藏不需要显示的部分。 Args: p1_x,y,p1_y: 第一个顶点 p2_x,y,p2_y: 第二个顶点 p3_x,y,p3_y: 第三个顶点(可选,省略则为三角形覆盖区) p4_x,y,p4_y: 第四个顶点(可选,省略则为三角形覆盖区) layer: 图层名称

  • draw_xline

    绘制构造线(通过两点的双向无限长直线)。 构造线是双向延伸的无限直线,用于布局参照、轴线、对称线等。 Args: point1_x,y,z: 第一个点坐标 point2_x,y,z: 第二个点坐标 layer: 图层名称 color: 颜色

  • dry_run_cad_planread-only

    Dry-run a guarded CAD plan without modifying the DWG.

  • edit_table_cell

    编辑表格中指定单元格的文字内容。 Args: table_handle: 表格实体的句柄 row: 行号(从0开始计数) col: 列号(从0开始计数) text: 要设置的文字内容

  • end_undo_group

    End an AutoCAD undo group.

  • erase_selection_entitiescan change or delete data

    Description is built at runtime.

  • evaluate_vlm_groundingread-only

    Score retrieval, exact/alternative handle groups, and issue labels. Use expected_handle_group for one complete shape (expected_handles is a compatibility alias), expected_alternative_groups for mutually valid ambiguous decisions, and expected_status to enable decision metrics. Set ground_truth_exhaustive=False for sampled annotations; unmatched findings are then treated as unknown and exhaustive precision is omitted.

  • execute_cad_plancan change or delete data

    Execute a guarded CAD plan only when allow_modify=True.

  • execute_queryread-only

    在 CAD 元数据数据库上执行 SQL 查询。 数据库包含扫描后的实体、图层、图块、文本模式等信息。 这是 AI 理解和分析图纸内容的核心工具。 常用表: cad_entities — 所有扫描的实体(type, layer, color, properties JSON) cad_layers — 图层配置 cad_blocks — 图块定义 cad_geometry_primitives — 派生点/线/曲线/面/体 cad_geometry_relations — starts_at/ends_at/bounded_by 等拓扑关系 cad_topology_summary — 每个实体的点线面体摘要 text_patterns — 文本搜索统计 drawing_snapshots— 图纸快照 常用查询示例: SELECT type, COUNT(*) as n FROM cad_entities GROUP BY type ORDER BY n DESC SELECT * FROM cad_entities WHERE layer = 'WALL' SELECT * FROM cad_entities WHERE json_extract(geometry, '$.radius'…

  • execute_sql_queryread-only

    执行 SQL 查询(execute_query 的别名,兼容不同的命名习惯)。

  • explain_entityread-only

    Explain one scanned entity, including topology, nearby entities, and annotations.

  • explode_block

    分解图块引用为基本实体。 分解后的实体可以被单独编辑。 Args: handle: 图块引用的句柄(不是图块定义名)

  • explode_entity

    分解实体(将块/多段线/标注/填充等复合实体分解为基本图元)。 Args: handle: 要分解的实体句柄

  • export_drawing_irread-only

    Export the current CAD-IR v2 as JSON without modifying the DWG.

  • export_dwf

    将当前图纸导出为 DWF (Design Web Format) 文件。 DWF 用于在线查看和标记,文件小、不可编辑。 Args: filepath: DWF 保存路径

  • export_dxf

    将当前图纸导出为 DXF 文件。 DXF 是一种开放的 CAD 交换格式,可被大多数 CAD 软件读取。 Args: filepath: DXF 保存路径,如 C:/output/drawing.dxf

  • export_image

    将当前视图导出为图片(BMP 或 WMF 格式)。 Args: filepath: 图片保存路径(.bmp 或 .wmf 扩展名)

  • export_pdf

    将当前图纸导出为 PDF 文件。 生成的 PDF 可用于打印、分享和归档。 Args: filepath: PDF 保存路径,如 C:/output/drawing.pdf

  • export_view_image

    Description is built at runtime.

  • export_view_image_with_mapping

    Export a view artifact plus sidecar world/pixel/entity mapping.

  • extend_entity

    延伸实体到指定边界。 将实体的一端延伸到与边界相交的位置。 Args: extend_handle: 需要延伸的实体句柄 boundary_handles:边界实体句柄列表

  • extract_drawing_constraints

    Extract dimension and rule-based geometric constraints into SQLite.

  • extrude_region

    将面域拉伸为三维实体。 Args: region_handle: 面域实体句柄 height: 拉伸高度(正值向Z正向) taper_angle: 拔模角度(度,-90~90,0=垂直拉伸) layer: 图层名称

  • extrude_region_along_path

    沿路径曲线拉伸面域生成三维实体。 路径可以是多段线、样条曲线、圆弧等曲线对象。 Args: region_handle: 面域实体句柄 path_handle: 路径曲线句柄 layer: 图层名称

  • fillet_entities

    对两个实体执行圆角倒角(用指定半径的圆弧平滑连接)。 适用于直线、多段线、圆弧等。圆角是机械制图中最常见的边角处理。 Args: handle1: 第一个实体句柄 handle2: 第二个实体句柄 radius: 圆角半径(必须为正数)

  • fillet_polyline

    Description is built at runtime.

  • find_entities_by_descriptionread-only

    Find scanned entities with rule-based lexical and spatial matching.

  • find_semantic_objectsread-only

    Search detected semantic objects by type or label.

  • find_text

    在图纸中搜索包含指定文本的所有文字实体。 搜索范围包括单行文字(Text)和多行文字(MText)。 匹配的实体可选地被高亮显示。 Args: pattern: 要搜索的文本模式(区分大小写) highlight_color: 高亮颜色 (1=红, 2=黄, 3=绿, 0=不高亮)

  • format_table

    Set column widths, row heights, and row-type text heights for a table. Args: table_handle: Existing AcDbTable handle. column_widths: Optional width for each column, in drawing units. row_heights: Optional height for each row, in drawing units. title_text_height: Optional title-row text height. header_text_height: Optional header-row text height. data_text_height: Optional data-row text height.

  • freeze_layer

    冻结图层(图层不可见且不参与重生成,提升性能)。 Args: name: 图层名称

  • fuse_vlm_findings_into_semantic_graph

    Materialize VLM findings as SQLite semantic graph objects and relations.

  • get_active_space_info

    获取当前工作空间信息(模型空间还是图纸空间)。

  • get_active_ucs

    获取当前活动UCS的详细信息。

  • get_all_blocks

    列出图纸中所有图块定义(包括它们的实体数量和类型)。 这对于了解图纸中有哪些可复用的图块非常有用。

  • get_all_groups

    列出所有已定义的实体组。

  • get_all_layers

    列出所有图层及其状态。 显示每个图层的名称、颜色、线型、状态(冻结/锁定/关闭/正常)。

  • get_all_tablesread-only

    获取 CAD 元数据库中的所有表名。 查看数据库中有哪些数据可用。

  • get_all_ucs

    列出所有命名UCS(用户坐标系)。

  • get_application_info

    获取 AutoCAD 应用程序信息(版本号、安装路径等)。

  • get_block_attributes

    获取图块参照的所有属性标签、值、提示等信息。 返回完整的属性列表,每个属性包含 tag、value、prompt、height、rotation 等。 Args: handle: 图块参照的实体句柄

  • get_bounding_box

    获取实体的轴对齐包围盒(最小/最大坐标)。 Args: handle: 实体句柄

  • get_cad_resourceread-only

    Return a read-only CAD understanding resource by URI.

  • get_current_selectionread-only

    Description is built at runtime.

  • get_current_view

    获取当前视图信息(中心、高度、宽度、目标等)。

  • get_database_maintenance_statusread-only

    Return SQLite freelist, cache-table, and legacy database status.

  • get_dictionaries

    列出所有命名字典(用于存储自定义对象和 XRecords)。

  • get_dimension_measurement

    获取标注的测量值、文字覆盖、旋转角度等详细信息。 Args: handle: 标注实体句柄

  • get_dimension_styles

    列出所有标注样式。

  • get_document_info

    获取当前文档的完整信息。 返回文档名称、路径、实体数量、图层数、块数、样式数、 单位、作者、标题等元数据。这是 AI 了解图纸概况的主要工具。

  • get_drawing_constraintsread-only

    List extracted constraints, optionally filtered by status.

  • get_entity_properties

    获取实体的完整属性(包括类型特定的几何信息)。 返回 JSON 格式的属性列表,包含句柄、类型、图层、颜色、线型等基本属性, 以及类型特有的几何数据(如直线有起终点,圆有圆心和半径等)。 Args: handle: 实体句柄

  • get_entity_statistics

    获取当前图纸的实体统计信息(按类型和图层分类)。 显示数据库中各类实体的数量和分布,帮助快速了解图纸的构成。

  • get_entity_topologyread-only

    获取单个实体派生出的点、线、面与拓扑关系。

  • get_extension_dictionary

    获取实体的扩展字典信息。 扩展字典是可附加在任何实体上的用户自定义数据容器。 可用于存储 XRecords(自定义命名数据)。 Args: handle: 实体句柄

  • get_file_dependencies

    列出当前图纸的所有文件依赖(外部参照、图片、字体等)。

  • get_hyperlinks

    获取实体上所有超链接的详细信息。 Args: handle: 实体句柄

  • get_layouts

    列出所有布局(模型空间和所有图纸空间布局)。

  • get_legacy_database_statusread-only

    Report whether retired root-level autocad_data.db is present.

  • get_linetypes

    列出所有已加载的线型。

  • get_materials

    列出所有已定义的材质。

  • get_named_views

    列出所有命名视图及其配置。

  • get_plot_configurations

    列出所有命名页面设置(打印配置)。

  • get_plot_devices

    列出所有可用的打印设备/绘图仪。

  • get_plot_style_tables

    列出所有可用的打印样式表(CTB和STB文件)。

  • get_preference

    读取单个 AutoCAD 偏好设置值。 pref_path 格式: "Category.Property" 常用示例: Display.CursorSize — 十字光标大小 (1-100) Drafting.AutoSnapMarker — 自动捕捉标记开关 OpenSave.AutoSaveInterval — 自动保存间隔(分钟) Selection.PickBoxSize — 拾取框大小 Selection.DisplayGrips — 夹点显示 Args: pref_path: 偏好路径

  • get_preferences_display

    获取显示相关偏好设置(光标大小、布局选项卡等)。

  • get_preferences_drafting

    获取绘图相关偏好设置(自动捕捉、极轴追踪等)。

  • get_preferences_files

    获取文件路径偏好设置(支持路径、模板路径等)。

  • get_preferences_opensave

    获取打开/保存偏好设置(自动保存间隔、备份等)。

  • get_preferences_selection

    获取选择偏好设置(夹点、拾取框大小等)。

  • get_preferences_system

    获取系统偏好设置。

  • get_preferences_user

    获取用户偏好设置。

  • get_registered_applications

    列出所有已注册的应用名称。

  • get_semantic_graphread-only

    Return the current SQLite-backed semantic graph.

  • get_snapshot_imageread-only

    Description is built at runtime.

  • get_snapshots

    列出最近的图纸快照记录。 Args: limit: 返回的快照数量(默认5)

  • get_table_schemaread-only

    获取指定数据库表的列结构(列名、类型、约束)。 Args: table_name: 表名(如 cad_entities, cad_layers)

  • get_text_styles

    列出所有文字样式及其字体配置。

  • get_tool_helpread-only

    Description is built at runtime.

  • get_topology_summaryread-only

    列出实体的点/线/面/体拓扑摘要,便于理解图纸几何关系。

  • get_trace_source_imageread-only

    Description is built at runtime.

  • get_validation_reportread-only

    Return the latest cached validation report.

  • get_variable

    获取 AutoCAD 系统变量的当前值。 常见变量: INSUNITS(单位), LTSCALE(线型比例), DIMSCALE(标注比例), TEXTSIZE(文字高度), PDMODE(点样式), FILLETRAD(圆角半径), etc. Args: variable_name: 系统变量名称(不区分大小写)

  • get_viewports

    列出所有图纸空间视口。

  • get_visible_entities_in_viewread-only

    List handles visible in a mapped view snapshot.

  • get_vision_capabilitiesread-only

    Description is built at runtime.

  • get_vlm_findingsread-only

    List persisted VLM review findings for the current drawing scope.

  • get_workspace_contextread-only

    Return the active workspace/conversation/thread/drawing database scope.

  • get_xdata

    获取实体上的扩展数据 (XData)。 扩展数据是附着在实体上的自定义数据, 可用于存储AI生成的元数据、分类标签、注释等。 Args: handle: 实体句柄 app_name: 注册应用名称(空字符串=获取所有应用的XData)

  • get_xrefs

    列出所有外部参照及其状态。

  • ground_vlm_overlay_idread-only

    Ground a VLM overlay ID to an AutoCAD handle and primitive candidates.

  • ground_vlm_regionread-only

    Ground a VLM pixel bbox to unique handles and multi-handle shape candidates. LINE/POLYLINE and analytic curve candidates use actual pixel paths instead of filled axis-aligned extents. An optional semantic_type (for example ``closed_profile``) conditionally reranks only when an exact, spatially supported semantic shape exists; it is not a hard filter. The result includes an explicit ambiguity margin between distinct handle groups; decision depth is independent of display top_k.

  • hatch_add_boundary

    为已有填充对象添加外边界环。 填充对象必须先通过 add_hatch 创建。 边界实体必须是闭合曲线(圆、椭圆、闭合多段线等)。 Args: handle: 填充对象句柄(由 add_hatch 返回) boundary_handles: 边界实体句柄列表

  • hatch_add_inner_loop

    向已有填充对象添加内部环(孤岛/空洞)。 内部环定义了填充区域内的空白区域。 Args: handle: 填充对象句柄 inner_handles: 内部环实体句柄列表

  • hatch_get_properties

    获取填充对象的所有属性(图案名、缩放、角度、面积、环数等)。 Args: handle: 填充对象句柄

  • hatch_set_gradient

    将已有填充对象设置为渐变色填充。 支持各种渐变类型(线性、圆柱、球体等)。 Args: handle: 填充对象句柄 gradient_type: 渐变类型 (0=线性, 1=圆柱, 3=球体...) color1: 起始颜色名称 color2: 终止颜色名称

  • hatch_set_properties

    修改已有填充对象的图案属性。 可同时设置填充比例、旋转角度、双线等。 Args: handle: 填充对象句柄 pattern_scale: 图案缩放比例(如 2=放大2倍, 0.5=缩小一半) pattern_angle: 图案旋转角度(度) pattern_double: 是否启用双线填充(True/False) hatch_style: 孤岛检测: 0=Normal, 1=Outer, 2=Ignore

  • highlight_entities

    批量高亮多个实体。 Args: handles: 实体句柄列表 color: 高亮颜色索引

  • highlight_entity

    通过句柄高亮显示指定实体(临时改变其颜色)。 这是查看特定实体在图中位置的最直接方式。 Args: handle: 实体句柄 color: 高亮颜色索引 (1=红, 2=黄, 3=绿, 4=青, 5=蓝, 6=洋红)

  • highlight_query_results

    执行数据库查询并用结果在 CAD 中高亮对应实体。 这是 AI 最强大的分析工具之一: 1. 用 SQL 查询找出所有符合特定条件的实体 2. 在 CAD 中高亮它们,方便人工查看 使用 workflow: 1. scan_all_entities → 扫描图纸到数据库 2. execute_query → 用 SQL 分析数据 3. highlight_query_results → 在 CAD 中高亮结果 Args: sql_query: 必须返回 handle 列的 SQL 查询 color: 高亮颜色 (1-6)

  • import_dxf

    Import a DXF file through native AutoCAD Import into a separate unsaved drawing. Requires allow_modify=true. Use instead of open_drawing for DXF, then inspect units and scan_all_entities.

  • insert_block

    Description is built at runtime.

  • insert_block_with_attributes

    插入带有属性值的图块参照。 在插入图块时同时设置属性值,避免了先插入再逐个设置属性的麻烦。 属性列表格式: [{"tag": "DOOR_NO", "value": "D01"}, ...] Args: block_name: 图块名称 x, y, z: 插入点坐标 x_scale: X缩放 y_scale: Y缩放 z_scale: Z缩放 rotation: 旋转角度(度) attributes: 属性列表 [{"tag": "标签名", "value": "值"}, ...] layer: 图层名称

  • insert_minsert_block

    Description is built at runtime.

  • intersect_with

    计算两个实体的交点。 适用于直线、圆弧、圆、椭圆、样条曲线、多段线之间的求交。 Args: handle1: 第一个实体句柄 handle2: 第二个实体句柄 extend_option: 延伸选项: 0=都延伸 1=延伸第一个 2=延伸第二个 3=都不延伸

  • is_autocad_idle

    检查 AutoCAD 是否处于空闲状态(未处理命令)。

  • isolate_layer

    隔离图层:关闭除指定图层外的所有其他图层。 这让你可以专注于特定图层上的内容。 Args: name: 要保留可见的图层名称

  • join_entities

    将多个同类型实体合并为一个连续实体。 支持合并共线的直线、同心同半径的圆弧、相同多段线等。 Args: handles: 需要合并的实体句柄列表(至少2个)

  • lengthen_entity

    修改实体的长度(延长或缩短)。 三种模式: delta — 线性增量(正值=延长,负值=缩短) percent — 百分比(100=不变,200=翻倍,50=缩短一半) total — 设置为指定总长度 Args: handle: 实体句柄 mode: "delta"(增量), "percent"(百分比), "total"(总长) value: 修改量(与mode相关) end: 修改端: "both"(两端), "start"(起点端), "end"(终点端)

  • list_cad_resourcesread-only

    List CAD understanding resource URIs.

  • list_spatial_annotationsread-only

    Description is built at runtime.

  • list_workspace_drawingsread-only

    List drawings known to the current workspace metadata database.

  • load_linetype

    从线型库文件加载线型。 常用线型: HIDDEN(虚线), CENTER(中心线), DASHDOT(点划线), PHANTOM(假想线), DIVIDE(分界线), BORDER(边界线) Args: name: 线型名称 filename: 线型库文件名(默认 acad.lin,也可用 acadiso.lin)

  • lock_layer

    锁定图层(图层可见但不能编辑)。 锁定图层上的实体可以被看到、捕捉、测量,但不能被修改或删除。 Args: name: 图层名称

  • maintain_database

    Prune derived cache history and reclaim SQLite free pages.

  • map_pixel_region_to_world_bboxread-only

    Map a pixel bbox region from a snapshot to an approximate world bbox.

  • map_pixel_to_worldread-only

    Map snapshot pixel coordinates to approximate world coordinates.

  • map_world_to_pixelread-only

    Map world coordinates to snapshot pixel coordinates.

  • measure_distance

    计算两点之间的直线距离和角度。 不依赖 AutoCAD — 纯数学计算。 Args: x1, y1, z1: 第一个点坐标 x2, y2, z2: 第二个点坐标

  • measure_entity

    定距等分实体(在实体上按指定间距插入点或图块)。 Args: handle: 实体句柄 length: 间距距离 block_name: (可选)用于标记的块名,留空则插入点对象

  • mirror_3d

    关于三维空间中的平面对实体进行3D镜像。 Args: handle: 实体句柄 p1_x,y,z: 平面上第一个点 p2_x,y,z: 平面上第二个点 p3_x,y,z: 平面上第三个点

  • mirror_entity

    镜像实体(关于指定直线对称复制)。 Args: handle: 实体句柄 line_start: 镜像线起点 [x, y, z] line_end: 镜像线终点 [x, y, z]

  • move_entity

    移动实体到新位置。 Args: handle: 实体句柄(唯一标识符,由绘图工具返回) from_point: 基点坐标 [x, y, z],位移参考点 to_point: 目标点坐标 [x, y, z],移动到此处

  • offset_entity

    偏移实体(创建等距的平行线/同心圆/等距曲线)。 适用于多段线、圆、圆弧、直线、样条曲线等。 Args: handle: 实体句柄 distance: 偏移距离。正值=外侧/右侧, 负值=内侧/左侧

  • open_drawing

    打开现有的 AutoCAD 图纸文件(.dwg)。 Args: filepath: 图纸文件的完整路径,如 C:/drawings/my_project.dwg password: 如果文件有密码保护,提供密码

  • pan

    平移视图(不改变缩放级别)。 Args: x_offset: X方向平移量(正值向右移动视图) y_offset: Y方向平移量(正值向上移动视图)

  • plot_preview

    显示打印预览窗口。 Args: preview_type: 0=部分预览(纸张大小), 1=完整预览(含图形内容)

  • plot_to_device

    将当前布局发送到打印设备/绘图仪。 Args: plot_config: 打印配置名称(PC3文件名或Windows打印机名称)

  • plot_to_file

    将当前布局打印输出到 PLT 文件。 Args: filepath: 输出文件路径(如 C:/plots/drawing.plt) plot_config: 打印配置名称

  • polar_point

    计算从起点出发,指定角度和距离的目标点坐标。 常用于:已知一个点和方向,计算另一个点的位置。 Args: x, y, z: 起点坐标 angle_deg: 角度(度,从X轴逆时针计算) distance: 距离

  • polyline_add_vertex

    向多段线在指定位置添加新顶点。 Args: handle: 多段线实体句柄 index: 插入位置索引(0=开头, -1=末尾) x, y: 新顶点坐标

  • polyline_constant_width

    获取或设置多段线的统一线宽。 不传 width 参数=获取当前统一宽度。 传入 width 值=将所有段设为该统一宽度。 Args: handle: 多段线实体句柄 width: 统一宽度(不传=获取)

  • polyline_get_bulge

    获取多段线顶点的凸度值。 Args: handle: 多段线实体句柄 index: 顶点索引

  • polyline_get_point_at_param

    获取多段线上指定参数处的3D坐标。 Args: handle: 多段线实体句柄 param: 参数值(沿多段线的归一化距离)

  • polyline_get_segment_type

    获取多段线段的类型(直线段 "line" 或圆弧段 "arc")。 Args: handle: 多段线实体句柄 index: 段索引(从0开始)

  • polyline_get_width

    获取多段线段的起点和终点宽度。 Args: handle: 多段线实体句柄 seg_index: 段索引

  • polyline_num_vertices

    获取多段线的顶点总数。 Args: handle: 多段线实体句柄

  • polyline_set_bulge

    设置多段线顶点的凸度(创建曲线段/圆弧段)。 凸度因子: 0=直线段, 正值=逆时针圆弧, 负值=顺时针圆弧。 凸度 = tan(圆心角/4),常用范围 -1 到 1。 Args: handle: 多段线实体句柄 index: 顶点索引(从0开始) bulge: 凸度值

  • polyline_set_width

    设置多段线段的起点和终点宽度(创建变宽线段)。 可创建渐变宽度效果,如箭头、流线型等。 Args: handle: 多段线实体句柄 seg_index: 段索引(段连接顶点 seg_index 和 seg_index+1) start_width: 段起点宽度 end_width: 段终点宽度

  • prepare_image_trace

    Prepare a single external image for Agent-side VLM tracing.

  • prepare_visual_semantic_contextread-only

    Prepare VLM-friendly artifacts and schema for open-vocabulary component recognition.

  • promote_vlm_finding_to_validation_issue

    Copy selected VLM findings into the cached validation report.

  • propose_constraint_repair_planread-only

    Propose a non-executing CAD repair plan for violated constraints.

  • propose_repair_planread-only

    Propose a non-executing CAD repair plan for validation issues.

  • purge_drawing

    清理图纸:删除所有未使用的图层、线型、文字样式、块等。 这可以减小文件大小,提高性能。

  • real_to_string

    将实数值格式化为指定单位的字符串。 Args: value: 数值 unit: 单位: 0=十进制, 1=工程制, 2=建筑制, 3=分数制 precision: 精度位数

  • recommend_cad_toolsread-only

    Description is built at runtime.

  • redo

    重做被撤销的操作。 Args: count: 重做步数(默认1)

  • regen

    重新生成图形显示(刷新视图)。 Args: which: "all"=所有视口, "active"=仅活动视口

  • reload_xref

    重新加载外部参照(获取源文件的最新内容)。 Args: name: 外部参照名称

  • remove_hyperlink

    删除实体上的指定超链接。 Args: handle: 实体句柄 index: 超链接索引(0=第一个,1=第二个,...)

  • rename_layer

    重命名图层。 Args: old_name: 当前图层名 new_name: 新图层名

  • render_drawing_view

    Description is built at runtime.

  • replace_text

    替换图纸中所有文字实体中的指定文本。 会遍历所有文字实体,将其中的匹配部分替换为新文本。 Args: find: 要查找的文本 replace: 替换为的文本

  • reset_entity_color

    重置实体颜色(恢复到高亮前的颜色)。 Args: handle: 实体句柄 original_color: 原始颜色索引(默认256=ByLayer)

  • restart_mcp

    Description is built at runtime.

  • restore_named_view

    恢复到之前保存的命名视图。 Args: name: 视图名称

  • revolve_region

    将面域绕轴旋转生成三维旋转体。 常用于创建回转体零件,如轴、轮毂、花瓶等。 Args: region_handle: 面域实体句柄 axis_x,y,z: 旋转轴起点坐标 dir_x,y,z: 旋转轴方向向量 angle: 旋转角度(度,默认360=完整旋转体) layer: 图层名称

  • rollback_undo_group

    Rollback the current AutoCAD undo group when possible.

  • rotate_3d

    围绕三维空间中的轴旋转实体。 与普通旋转不同,此操作可围绕任意3D轴旋转。 Args: handle: 实体句柄 axis_x1,y1,z1: 旋转轴起点 axis_x2,y2,z2: 旋转轴终点 angle: 旋转角度(度,右手法则)

  • rotate_entity

    旋转实体。 Args: handle: 实体句柄 base_point: 旋转中心点 [x, y, z] angle: 旋转角度(度),逆时针为正

  • save_drawing

    保存当前 AutoCAD 图纸。 Args: filepath: 保存路径。为None则保存到原路径(覆盖原文件)

  • save_named_view

    将当前视图保存为命名视图(方便后续快速恢复视角)。 Args: name: 视图名称(如 "正面视角", "细节视图A")

  • scale_entity

    缩放实体(等比放大或缩小)。 Args: handle: 实体句柄 base_point: 缩放基点 [x, y, z](不动点) scale: 缩放倍率(2=放大2倍, 0.5=缩小一半)

  • scan_all_entities

    扫描当前图纸中的所有实体并保存到数据库。 这是 AI 理解图纸的核心工具 — 它将 AutoCAD 中的图形对象转换为结构化数据, 存入 SQLite 数据库。之后 AI 可以通过 execute_query 进行 SQL 查询、 统计分析和智能过滤。 建议在对图纸进行重大修改后重新扫描。 Args: clear_db: 是否先清空数据库(默认True=重新扫描, False=追加) max_entities: 最大扫描实体数(默认5000,超大图纸请谨慎) clear_annotations: 是否同时清空模型私有空间标注(默认False=保留) clear_understanding: 是否清空当前线程派生理解缓存(默认True=避免旧缓存混入新扫描) detail_level: minimal/standard/full。大图默认 minimal 更快。 include_bounding_boxes: 是否读取实体包围盒,便于后续空间查询。 derive_topology: 是否生成拓扑表。默认生成轻量摘要,便于 agent 识别。 topology_detail: summary/full/none。summary 只写拓扑摘要,full 写点线面关系。 capture_visual_ge…

  • scan_entities_in_area

    扫描指定矩形区域内的实体。 用于关注图纸的特定区域,避免扫描整个图纸。 Args: x_min, y_min: 区域左下角坐标 x_max, y_max: 区域右上角坐标

  • section_solid

    创建三维实体的截面(生成二维面域)。 不修改原始实体,生成一个新的面域表示截面形状。 Args: handle: 实体句柄 p1_x,y,z: 截面上第一个点 p2_x,y,z: 截面上第二个点 p3_x,y,z: 截面上第三个点

  • select_all

    选择当前图纸中的所有实体。

  • select_at_point

    选择经过指定点的所有实体。 Args: x, y, z: 选择点坐标

  • select_by_cpolygon

    交叉多边形选择:选择与多边形相交或在其内的实体。 Args: points: 多边形顶点坐标列表 [x1,y1, x2,y2, ...]

  • select_by_crossing

    交叉选择(与选择框相交的实体都被选中,比窗口选择更宽松)。 Args: x1, y1: 选择框的第一个角点 x2, y2: 选择框的对角点

  • select_by_fence

    栏选:选择与指定折线相交的所有实体。 栏选是 CAD 中高效的批量选择方式,穿越栏选线的实体都会被选中。 Args: points: 栏选折线的顶点坐标 [x1,y1, x2,y2, x3,y3, ...]

  • select_by_window

    窗口选择(完全在矩形窗口内的实体被选中)。 Args: x1, y1: 选择窗口的第一个角点 x2, y2: 选择窗口的对角点

  • select_by_wpolygon

    窗口多边形选择:选择完全在多边形内部的实体。 Args: points: 多边形顶点坐标列表 [x1,y1, x2,y2, ...]

  • select_on_screen

    交互式屏幕选择 — 提示用户在 AutoCAD 中手动选择实体。 注意:这需要用户正在交互式使用 AutoCAD。

  • send_commandcan change or delete data

    Description is built at runtime.

  • set_active_layout

    切换到指定布局。 Args: name: 布局名称。使用 "Model" 切换到模型空间

  • set_active_material

    设置当前材质(新创建的对象将使用此材质)。 Args: material_name: 材质名称

  • set_active_ucs

    激活指定的UCS。 Args: name: UCS名称

  • set_block_attribute

    通过标签名设置图块参照中的单个属性值。 精确地修改指定标签的属性值,其他属性保持不变。 Args: handle: 图块参照的实体句柄 tag: 属性标签名称 value: 要设置的新值

  • set_current_dimension_style

    设置当前标注样式。后续创建的标注将使用此样式。 Args: name: 标注样式名称(如 "Standard", "ISO-25")

  • set_current_layer

    设置当前图层。后续绘图操作默认在此图层上进行。 Args: name: 图层名称

  • set_current_text_style

    设置当前文字样式。后续创建的文字将使用此样式。 Args: name: 文字样式名称

  • set_dimension_text_override

    覆盖标注文字(用自定义文本替换自动测量值)。 例如将 "100.00" 替换为 "100±0.5" 或 "参考尺寸"。 空字符串 "" 恢复自动测量值。 Args: handle: 标注实体句柄 text: 自定义文字(空字符串=恢复自动)

  • set_document_properties

    设置当前图纸的摘要属性(标题、作者、关键词等)。 Args: title: 图纸标题 subject: 主题 author: 作者 keywords: 关键词(逗号分隔) comments: 注释

  • set_drawing_password

    为当前图纸设置打开密码(加密保存)。 注意:设置密码后必须保存文件才能生效。 Args: password: 密码字符串

  • set_entity_material

    为实体分配材质。 Args: handle: 实体句柄 material_name: 材质名称

  • set_entity_plot_style

    设置实体的打印样式。 打印样式控制在打印/出图时实体的外观(覆盖颜色、线宽等)。 Args: handle: 实体句柄 plot_style: 打印样式名称

  • set_entity_properties

    设置实体的显示属性(颜色、图层、线型等)。 可以一次设置多个属性。只为需要改变的属性传值。 Args: handle: 实体句柄 color: 颜色索引 (1=红 2=黄 3=绿 4=青 5=蓝 6=洋红 7=白 256=ByLayer) layer: 目标图层名称(图层必须存在) linetype: 线型名称 (Continuous, Dashed, Hidden, Center, Phantom...) linetype_scale: 线型比例因子 lineweight: 线宽(毫米) (0, 0.05, 0.09, 0.13, 0.15, 0.18, 0.20, 0.25, 0.30, 0.35, 0.40, 0.50, 0.53, 0.60, 0.70, 0.80, 0.90, 1.00, 1.06, 1.20, 1.40, 1.58, 2.00, 2.11) visible: 是否可见 (True/False) thickness: 拉伸厚度(赋予2D实体Z方向高度) elevation: 标高(Z方向基面位置)

  • set_entity_transparency

    设置实体的透明度。 透明度 0=完全不透明,90=接近完全透明。 可用于创建水印效果、淡化背景参照等。 Args: handle: 实体句柄 transparency: 透明度值 (0-90)

  • set_entity_truecolor

    将实体的颜色设置为 RGB 真彩色(超过1600万色)。 RGB 真彩色精度远超 ACI 255色索引。可精确匹配品牌色或视觉效果。 Args: handle: 实体句柄 red: 红色分量 (0-255) green: 绿色分量 (0-255) blue: 蓝色分量 (0-255)

  • set_preference

    设置单个 AutoCAD 偏好设置。 Args: pref_path: 偏好路径(如 OpenSave.AutoSaveInterval) value: 新值(数字或 True/False)

  • set_text_alignment

    设置文字对象的对齐方式。 0=Left, 1=Center, 2=Right, 4=Middle, 7=TopCenter, 10=MiddleCenter, 13=BottomCenter 等。 Args: handle: 文字实体句柄 alignment: 对齐代码 (0-14) align_x, align_y: 对齐点坐标 align_z: Z坐标

  • set_text_properties

    设置文字的高级属性(倾斜角度、宽度因子、文字样式)。 倾斜角度可用于创建斜体效果,宽度因子控制字体宽度。 Args: handle: 文字实体句柄 oblique_angle: 倾斜角度(度,0=正常) scale_factor: 宽度因子(1=正常, 0.8=窄体, 1.2=宽体) style_name: 文字样式名称

  • set_variable

    设置 AutoCAD 系统变量的值。 可以修改 CAD 行为的各种参数。 Args: variable_name: 系统变量名称(如 LTSCALE, DIMSCALE, FILLETRAD) value: 要设置的值(数字或字符串,会自动转换类型)

  • set_viewport_properties

    设置图纸空间视口的属性。 Args: handle: 视口句柄 display_locked: 是否锁定视口显示(锁定后无法缩放/平移) custom_scale: 自定义缩放比例(如 1/100 = 0.01) on: 是否打开视口

  • set_workspace_context

    Set the workspace-aware metadata database scope for this MCP call path.

  • set_xdata

    为实体设置扩展数据 (XData)。 可以在实体上存储自定义的结构化数据。 例如: [{"code": 1000, "value": "承重墙"}, {"code": 1040, "value": 3.5}] 常用DXF组码: 1000: ASCII字符串 1001: 应用名称 1040: 实数 1070: 整数 Args: handle: 实体句柄 app_name: 注册应用名称(会自动注册) data_pairs: 数据对列表 [{"code": 组码, "value": 值}, ...]

  • slice_solid

    用三点定义的平面对三维实体进行剖切。 Args: handle: 实体句柄 p1_x,y,z: 平面上第一个点 p2_x,y,z: 平面上第二个点 p3_x,y,z: 平面上第三个点 negative_side_only: 是否只保留一侧(默认保留两侧)

  • solid_boolean

    对两个三维实体执行布尔运算(并集/交集/差集)。 这是三维建模的核心操作之一,可以组合多个简单实体创建复杂形状。 Args: target_handle: 目标实体句柄(被修改的实体) tool_handle: 工具实体句柄 operation: 运算类型: "union"(并集), "intersect"(交集), "subtract"(差集)

  • stretch_entities

    拉伸选择窗口内实体(移动被选中的顶点/端点)。 与 MOVE 不同,STRETCH 只移动实体中被选中的端点, 保持与其他固定部分的连接。这是最常用的编辑操作之一。 Args: x1,y1: 交叉选择窗口的第一个角点 x2,y2: 交叉选择窗口的对角点 from_x,y,z: 位移起点 to_x,y,z: 位移终点

  • submit_image_drawing_spec

    Validate and store an Agent-side VLM ImageDrawingSpec.

  • submit_vlm_review

    Validate, ground, and store VLM review findings in SQLite only.

  • summarize_drawingread-only

    Summarize scanned drawing metadata for an agent.

  • thaw_layer

    解冻图层(恢复冻结图层的可见性)。 Args: name: 图层名称

  • transform_entity

    对实体应用4×4变换矩阵(平移、旋转、缩放的综合变换)。 矩阵格式: [[a,b,c,d], [e,f,g,h], [i,j,k,l], [m,n,o,p]] Args: handle: 实体句柄 matrix: 4×4变换矩阵(16个数值的二维数组)

  • translate_coordinates

    在不同坐标系之间转换坐标。 坐标系统: 0=WCS世界, 1=UCS用户, 2=DCS显示, 3=PSDCS图纸空间, 4=OCS对象 Args: x, y, z: 源坐标 from_cs: 源坐标系代码(默认0=WCS) to_cs: 目标坐标系代码(默认1=UCS)

  • trim_entity

    用剪切边修剪实体(切除超出边界的部分)。 需要指定一个或多个剪切边(作为边界),以及需要被修剪的实体。 Args: trim_handle: 需要被修剪的实体句柄 cutting_handles: 作为剪切边界的实体句柄列表

  • turn_off_layer

    关闭图层(不可见但参与重生成计算)。 与冻结不同,关闭的图层仍参与重生成。 Args: name: 图层名称

  • turn_on_layer

    打开图层(恢复可见)。 Args: name: 图层名称

  • undo

    撤销操作(回退到之前的状态)。 Args: count: 撤销步数(默认1,最大100)

  • unisolate_layers

    取消图层隔离:打开所有被隔离关闭的图层。

  • unload_xref

    卸载外部参照(保留链接但不加载,提高性能)。 Args: name: 外部参照名称

  • unlock_layer

    解锁图层(恢复可编辑状态)。 Args: name: 图层名称

  • validate_cad_planread-only

    Validate a guarded CAD plan without modifying the DWG.

  • validate_geometry

    Create a geometry validation report from scanned metadata.

  • validate_image_drawing_specread-only

    Validate ImageDrawingSpec/v1 before CADPlan compilation.

  • validate_image_fidelity_contractread-only

    Reject silent feature simplification in image-trace CADPlans.

  • validate_vlm_review_outputread-only

    Validate VLM review JSON before grounding or persistence.

  • view_imageread-only

    Description is built at runtime.

  • zoom_all

    缩放到图形界限(显示整个绘图区域)。

  • zoom_center

    居中缩放到指定位置。 Args: center_x, center_y: 新的视图中心坐标 height: 视图高度(图形单位,越小越放大)

  • zoom_extents

    缩放到图形范围(让所有对象可见并填满视图)。 这是最常用的视图命令,确保你能看到图纸中的所有内容。

  • zoom_previous

    恢复到前一个视图(撤销视图变化)。

  • zoom_scale

    按比例缩放视图。 Args: scale: 缩放倍率(2=放大2倍, 0.5=缩小一半)

  • zoom_window

    缩放到指定矩形窗口区域。 Args: x1, y1: 窗口第一个角点坐标 x2, y2: 窗口对角点坐标

Signals

Stars
33
Forks
6
Open issues
0
Contributors
4
Weekly downloads
214
Last commit
Oct 1, 2026 (1 month ago)
Last release
Sep 23, 2026 (1 month ago)
Last package publish
Sep 23, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026) and the package registry.

Details

Registry name
io.github.LokmenoWer/best-cad-mcp
Version
1.7.2
Auth
No auth
Packages
pypi best-cad-mcp
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get best-cad-mcp running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying best-cad-mcp?

CallGet help
Cite this page

best-cad-mcp. Agent Mart. https://agentmart.dev/connectors/lokmenower-best-cad-mcp (last updated 2026-10-24)