Files
envi-code/SourceCode/Code2026/cad_mcp_aec/mcp_config.json
T
company-desktop 4f1ea72e4e refactor: cad_mcp_aec 工具改按仓库既有格式描述,并合入 mcp_config.json
现象:上一版自己发明的描述文件 cad-mcp-aec.json 与仓库既有工具(add_line /
query_entities / get_entity_detail)的风格不一致——工具名前缀不同、
点用 {x,y,z} 对象而不是 [x,y] 数组、颜色叫 color_index 而不是 color。
另外 cad_mcp_frame 的运行期配置文件名是 mcp_config.json(找不到才回落
cad-mcp-frame.json),单个 cad-mcp-aec.json 还得手工合并。

改动:
1. 工具改名,与既有工具同一套动词_名词风格:
   list_aec_entities        -> query_aec_entities
   get_aec_entity           -> get_aec_entity_detail
   create_aec_pipe|wall|slab|column|beam -> add_aec_*
2. 参数约定对齐既有工具:
   - 点改用 [x,y] / [x,y,z] 数组(对象写法仍兼容,后端不变);
   - 颜色用 color(ACI,256=ByLayer),并兼容旧写法 color_index;
   - add_* 支持 space(Model 或布局名),缺省模型空间;
   - get_aec_entity_detail 的输出也从 color_index 改成 color,和入参对称。
3. 删掉自定义的 cad-mcp-aec.json,把 12 个工具按标准 MCP 字段 + backend
   (type/dll_name/factory_function)写进 cad_mcp_aec/mcp_config.json,
   与既有 28 个工具同一份文件;inputSchema 写全,带每个参数的 description。
4. 插件里的 private_name()/private_input_schema() 同步成同一套名字与 schema,
   保证配置里没写 schema 时回落也一致。

验证:
- R230 Debug / Z2026 Debug 均编译通过并部署。
- AutoCAD 2020 实测(部署目录放这份 mcp_config.json,cad_mcp_frame 优先读它):
  tools/list = 30(既有 18 + 本插件 12),12 个 add_aec_*/update_aec_* 工厂全部加载成功;
  query 列出 20 根管道;add_aec_pipe 用 [0,0,0]->[2000,0,0] + color=1 建成功,
  detail 读回 dn_mm=100/od_mm=114/wall_thickness_mm=4/color=1;
  只给 end 的 update 后端点变 2500、壁厚与颜色不变;
  add_aec_wall/slab/column/beam 各建一次并读回参数一致。

已知(与本次改动无关):mcp_config.json 里有 10 个工具在仓库当前的
cad_mcp_plugins.dll 里没有对应工厂函数(AddText/AddMText/AddLine/AddPolyline/
AddLeaderAnnotation/DeleteEntities/SetEntityProperties/DrawRevisionCloud/
FindCollisions/SetDrawingArea),会被静默丢掉,补齐需要先把那些工具的实现
补进 cad_mcp_plugins。
2026-10-29 22:26:34 +08:00

1740 lines
49 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"version": "1.0.0",
"global_settings": {
"plugin_directory": ".",
"lisp_directory": ".",
"hot_reload": true
},
"tools": [
{
"name": "zoom_window_normalized",
"description": "归一化框选放大工具。当你发现当前截图中某些目标太小、细节模糊时,估算该目标在画面中的归一化坐标,调用此工具将该区域全屏放大以看清细节。",
"inputSchema": {
"type": "object",
"properties": {
"x1": {
"type": "number",
"description": "左上角 X 坐标,取值 0.0 到 1.0"
},
"y1": {
"type": "number",
"description": "左上角 Y 坐标,取值 0.0 到 1.0"
},
"x2": {
"type": "number",
"description": "右下角 X 坐标,取值 0.0 到 1.0"
},
"y2": {
"type": "number",
"description": "右下角 Y 坐标,取值 0.0 到 1.0"
}
},
"required": [
"x1",
"y1",
"x2",
"y2"
]
},
"backend": {
"type": "lisp_inline",
"script_template": "(progn (setq vc (getvar \"VIEWCTR\") vs (getvar \"VIEWSIZE\") ss (getvar \"SCREENSIZE\") w (* vs (/ (car ss) (cadr ss))) x_tl (- (car vc) (/ w 2.0)) y_tl (+ (cadr vc) (/ vs 2.0)) pt1 (list (+ x_tl (* {x1} w)) (- y_tl (* {y1} vs))) pt2 (list (+ x_tl (* {x2} w)) (- y_tl (* {y2} vs)))) (command \"_.ZOOM\" \"_W\" \"_non\" pt1 \"_non\" pt2))"
}
},
{
"name": "zoom_extents",
"description": "全局缩放。将CAD视口重置为显示所有图元。当你迷失方向、放大过度或者需要寻找新目标时使用。",
"inputSchema": {
"type": "object",
"properties": {}
},
"backend": {
"type": "lisp_inline",
"script_template": "(command \"_.ZOOM\" \"_E\")"
}
},
{
"name": "get_viewport_screenshot",
"description": "获取 AutoCAD 当前工作视口的实时截图。当需要检查图纸细节、判断是否需要缩放,或需要通过视觉确认图元位置时调用。",
"inputSchema": {
"type": "object",
"properties": {},
"required": []
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateViewportScreenshotTool"
}
},
{
"name": "set_drawing_area",
"description": "设置绘图区为最大化状态,显著提升截图像素与细节可读性。mode=max 时最大化 CAD 主窗口并进入干净屏幕(隐藏功能区/命令行/面板);mode=restore 时还原。截图取证前调用 max、结束后必须调用 restore。",
"inputSchema": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"max",
"restore"
],
"description": "max=最大化绘图区(最大化主窗口并进入干净屏幕,隐藏功能区/命令行/面板);restore=还原调用前的窗口位置与干净屏幕状态"
}
},
"required": [
"mode"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateSetDrawingAreaTool"
}
},
{
"name": "get_drawing_info",
"description": "获取当前图纸的元数据:文件名、单位、布局数量、各空间实体总数。审查流程的第一步。",
"inputSchema": {
"type": "object",
"properties": {}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetDrawingInfoTool"
}
},
{
"name": "get_layers",
"description": "获取图层清单:开关、冻结、锁定、颜色、线型,可选统计每图层实体数(用于查找空图层/规范检查)。",
"inputSchema": {
"type": "object",
"properties": {
"name_filter": {
"type": "string",
"description": "图层名通配符,如 \"WALL*\",省略则全部"
},
"include_empty": {
"type": "boolean",
"description": "统计实体数时是否包含空图层,默认 false"
},
"count_entities": {
"type": "boolean",
"description": "是否统计每图层实体数,默认 false"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetLayersTool"
}
},
{
"name": "get_layouts",
"description": "获取布局清单:模型空间与各图纸空间布局、实体数、布局内视口。",
"inputSchema": {
"type": "object",
"properties": {}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetLayoutsTool"
}
},
{
"name": "query_entities",
"description": "按图层/类型/范围查询图元摘要,分页返回(total/returned/offset/items)。实体 ID 为 handle。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string",
"description": "\"Model\" 或布局名,默认 Model"
},
"layer_filter": {
"type": "string",
"description": "图层通配符"
},
"type_filter": {
"type": "array",
"items": {
"type": "string"
},
"description": "类型白名单,如 [\"LINE\",\"LWPOLYLINE\"]"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"limit": {
"type": "integer",
"description": "单次最大返回,默认 200,上限 1000"
},
"offset": {
"type": "integer",
"description": "分页偏移,默认 0"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateQueryEntitiesTool"
}
},
{
"name": "get_text_content",
"description": "提取 TEXT/MTEXT/ATTRIB 文字:内容、位置、字高、旋转、图层、包围盒。用于查错字、空文字、重叠、字高异常。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string"
},
"content_filter": {
"type": "string",
"description": "内容子串过滤(可选)"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"limit": {
"type": "integer"
},
"offset": {
"type": "integer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetTextContentTool"
}
},
{
"name": "get_dimensions",
"description": "提取标注:类型、测量值、文本覆盖、标注样式、图层。用于查漏标/标注异常。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"limit": {
"type": "integer"
},
"offset": {
"type": "integer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetDimensionsTool"
}
},
{
"name": "get_block_references",
"description": "提取块参照:块名、插入点、旋转、缩放、图层及全部属性(tag/value)。用于查属性缺失/不符。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string"
},
"block_name_filter": {
"type": "string",
"description": "块名通配符"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"limit": {
"type": "integer"
},
"offset": {
"type": "integer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetBlockReferencesTool"
}
},
{
"name": "get_polylines_info",
"description": "提取多段线信息:闭合性、面积、长度、顶点数、包围盒。用于查未闭合轮廓。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"limit": {
"type": "integer"
},
"offset": {
"type": "integer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetPolylinesInfoTool"
}
},
{
"name": "get_entity_detail",
"description": "按 handle 获取单个实体的完整属性。用于对某疑点下钻查看。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string",
"description": "实体句柄"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateGetEntityDetailTool"
}
},
{
"name": "detect_drawing_frames",
"description": "识别图纸中的图框(块参照/闭合矩形多段线/直线组三种形态),推算图幅(A0-A4及加长)与方向,按位置排序。用于按图框逐张审查或分图。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string",
"description": "限定图框所在图层通配符"
},
"block_name_filter": {
"type": "string",
"description": "图框块名通配符;指定后仅按块名匹配,信任该块"
},
"detect_line_loops": {
"type": "boolean",
"description": "是否识别四条直线围成的图框,默认 false"
},
"min_side": {
"type": "number",
"description": "最小短边过滤(图纸单位)"
},
"ratio_tol": {
"type": "number",
"description": "长宽比容差,默认 0.06"
},
"axis_tol": {
"type": "number",
"description": "轴对齐判定容差,默认 1.0"
},
"min_confidence": {
"type": "number",
"description": "最低置信度过滤 0~1,默认 0"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateDetectDrawingFramesTool"
}
},
{
"name": "find_duplicate_entities",
"description": "查找几何重复/重叠实体,按几何签名分桶,返回重复组(handles)。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string"
},
"type_filter": {
"type": "array",
"items": {
"type": "string"
}
},
"tolerance": {
"type": "number",
"description": "几何容差,默认 0.001"
},
"limit": {
"type": "integer",
"description": "最大重复组数,默认 200"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateFindDuplicateEntitiesTool"
}
},
{
"name": "find_zero_length",
"description": "查找零长度/退化实体(长度小于容差的 LINE/ARC/LWPOLYLINE)。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string"
},
"tolerance": {
"type": "number",
"description": "长度容差,默认 0.001"
},
"limit": {
"type": "integer"
},
"offset": {
"type": "integer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateFindZeroLengthTool"
}
},
{
"name": "find_collisions",
"description": "查找包围盒相交(可能干涉)的实体对,返回候选 + 重叠证据(重叠盒、逐轴重叠比 ratio、类型/图层)。ratio 越大越可疑。注意:包围盒相交不等于真干涉(相邻管段在接口处会相接、L 形布局的包围盒会相交),请结合类型/图层判断,必要时用 inspect_region 放大目视复核。",
"inputSchema": {
"type": "object",
"properties": {
"space": {
"type": "string"
},
"layer_filter": {
"type": "string",
"description": "图层通配符,空 = 不过滤"
},
"window": {
"type": "object",
"description": "限定范围(bbox 与之相交即纳入)",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"min_overlap": {
"type": "number",
"description": "最小重叠比,默认 0"
},
"include_same_layer": {
"type": "boolean",
"description": "是否包含同图层实体对,默认 true"
},
"exclude_oversized": {
"type": "number",
"description": "剔除面积占参考面积超过该比例的实体,默认 0.5(用于去掉图框块)"
},
"narrow": {
"type": "boolean",
"description": "是否做几何细筛(intersectWith),默认 false;较慢"
},
"limit": {
"type": "integer",
"description": "最大返回对数,默认 200"
},
"offset": {
"type": "integer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateFindCollisionsTool"
}
},
{
"name": "zoom_to_entity",
"description": "缩放到指定 handle(或 handle 列表)实体的范围,四周留 5% 边距。配合截图确认。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"handles": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateZoomToEntityTool"
}
},
{
"name": "zoom_to_window",
"description": "缩放到指定 WCS 范围(逐图框审查用,对直线组图框尤其实用)。范围可给 min_x/min_y/max_x/max_y 或 window 对象。",
"inputSchema": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"margin": {
"type": "number",
"description": "四周留边比例,默认 0.02"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateZoomToWindowTool"
}
},
{
"name": "highlight_entities",
"description": "按 handle 列表临时高亮实体(改色,默认红色);restore=true 时复位为 ByLayer。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"handles": {
"type": "array",
"items": {
"type": "string"
}
},
"color": {
"type": "integer",
"description": "ACI 颜色索引,默认 1(红)"
},
"restore": {
"type": "boolean",
"description": "是否复位为 ByLayer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateHighlightEntitiesTool"
}
},
{
"name": "draw_revision_cloud",
"description": "在图纸上绘制修订云线(圈注批注)。shape=rect 时给 min_x/min_y/max_x/max_y 或 window 或 p1/p2 两角点;shape=polygon 时给 points 顶点列表(>=3);shape=circle 时给 center 与 radius。默认落在 AI_REVIEW 图层。",
"inputSchema": {
"type": "object",
"properties": {
"shape": {
"type": "string",
"enum": [
"rect",
"polygon",
"circle"
],
"description": "云线形态,默认 rect"
},
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
},
"window": {
"type": "object",
"properties": {
"min_x": {
"type": "number"
},
"min_y": {
"type": "number"
},
"max_x": {
"type": "number"
},
"max_y": {
"type": "number"
}
}
},
"p1": {
"type": "array",
"items": {
"type": "number"
},
"description": "矩形角点 [x,y]"
},
"p2": {
"type": "array",
"items": {
"type": "number"
},
"description": "矩形对角点 [x,y]"
},
"points": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "polygon 顶点列表 [[x,y],...]"
},
"center": {
"type": "array",
"items": {
"type": "number"
},
"description": "circle 圆心 [x,y]"
},
"radius": {
"type": "number",
"description": "circle 半径"
},
"bulge": {
"type": "number",
"description": "每段凸度,默认 0.5(≈半圆)"
},
"chord": {
"type": "number",
"description": "目标分段弦长,省略则自动估算"
},
"layer": {
"type": "string",
"description": "图层,默认 AI_REVIEW"
},
"color": {
"type": "integer",
"description": "ACI 颜色,默认 256(ByLayer)"
},
"space": {
"type": "string",
"description": "\"Model\" 或布局名,默认 Model"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateDrawRevisionCloudTool"
}
},
{
"name": "add_text",
"description": "插入单行文字批注。给 text 与 position([x,y]),可设 height(默认 2.5)、rotation(度)、text_style、layer(默认 AI_REVIEW)、color。",
"inputSchema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "文字内容"
},
"position": {
"type": "array",
"items": {
"type": "number"
},
"description": "插入点 [x,y]"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"height": {
"type": "number",
"description": "字高,默认 2.5"
},
"rotation": {
"type": "number",
"description": "旋转角度(度),默认 0"
},
"text_style": {
"type": "string",
"description": "文字样式名"
},
"layer": {
"type": "string",
"description": "图层,默认 AI_REVIEW"
},
"color": {
"type": "integer",
"description": "ACI 颜色,默认 256(ByLayer)"
},
"space": {
"type": "string"
}
},
"required": [
"text"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateAddTextTool"
}
},
{
"name": "add_mtext",
"description": "插入多行文字批注。给 text 与 position([x,y]),可设 height(默认 2.5)、width(0=不换行)、rotation(度)、attachment(如 middle_left)、text_style、layer(默认 AI_REVIEW)、color。",
"inputSchema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "文字内容,支持 \\n 换行"
},
"position": {
"type": "array",
"items": {
"type": "number"
},
"description": "插入点 [x,y]"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"height": {
"type": "number",
"description": "字高,默认 2.5"
},
"width": {
"type": "number",
"description": "文本框宽度,0=不换行,默认 0"
},
"rotation": {
"type": "number",
"description": "旋转角度(度),默认 0"
},
"attachment": {
"type": "string",
"description": "对齐点:top_left/top_center/top_right/middle_left/middle_center/middle_right/bottom_left/bottom_center/bottom_right,默认 top_left"
},
"text_style": {
"type": "string"
},
"layer": {
"type": "string",
"description": "图层,默认 AI_REVIEW"
},
"color": {
"type": "integer",
"description": "ACI 颜色,默认 256(ByLayer)"
},
"space": {
"type": "string"
}
},
"required": [
"text"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateAddMTextTool"
}
},
{
"name": "add_polyline",
"description": "绘制多段线批注。给 points 顶点列表(>=2),closed 是否闭合。默认落在 AI_REVIEW 图层。",
"inputSchema": {
"type": "object",
"properties": {
"points": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "顶点列表 [[x,y],...]"
},
"closed": {
"type": "boolean",
"description": "是否闭合,默认 false"
},
"layer": {
"type": "string",
"description": "图层,默认 AI_REVIEW"
},
"color": {
"type": "integer",
"description": "ACI 颜色,默认 256(ByLayer)"
},
"space": {
"type": "string"
}
},
"required": [
"points"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateAddPolylineTool"
}
},
{
"name": "add_line",
"description": "绘制直线批注。给 start/end([x,y]) 或 x1/y1/x2/y2。默认落在 AI_REVIEW 图层。",
"inputSchema": {
"type": "object",
"properties": {
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "起点 [x,y]"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "终点 [x,y]"
},
"x1": {
"type": "number"
},
"y1": {
"type": "number"
},
"x2": {
"type": "number"
},
"y2": {
"type": "number"
},
"layer": {
"type": "string",
"description": "图层,默认 AI_REVIEW"
},
"color": {
"type": "integer",
"description": "ACI 颜色,默认 256(ByLayer)"
},
"space": {
"type": "string"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateAddLineTool"
}
},
{
"name": "add_leader_annotation",
"description": "引线批注:一条带箭头的引线 + 多行文字。给 text 与 points(>=2,首点为箭头尖),可设 height、arrow、text_position、layer(默认 AI_REVIEW)、color。",
"inputSchema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "批注文字"
},
"points": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "引线顶点列表 [[x,y],...],首点为箭头尖"
},
"text_position": {
"type": "array",
"items": {
"type": "number"
},
"description": "文字位置,默认取引线末点"
},
"height": {
"type": "number",
"description": "字高,默认 2.5"
},
"arrow": {
"type": "boolean",
"description": "是否显示箭头,默认 true"
},
"layer": {
"type": "string",
"description": "图层,默认 AI_REVIEW"
},
"color": {
"type": "integer",
"description": "ACI 颜色,默认 256(ByLayer)"
},
"space": {
"type": "string"
}
},
"required": [
"text",
"points"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateAddLeaderAnnotationTool"
}
},
{
"name": "delete_entities",
"description": "按 handle 列表删除实体。用于清理 AI 自己产生的批注或图纸废线。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"handles": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateDeleteEntitiesTool"
}
},
{
"name": "set_entity_properties",
"description": "修改已有实体的图层/颜色(ACI)。至少给 layer 或 color 之一。用于把问题实体标红、归层等标记动作。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"handles": {
"type": "array",
"items": {
"type": "string"
}
},
"layer": {
"type": "string",
"description": "目标图层(不存在则创建)"
},
"color": {
"type": "integer",
"description": "ACI 颜色索引;256=ByLayer"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_plugins.dll",
"factory_function": "CreateSetEntityPropertiesTool"
}
},
{
"name": "query_aec_entities",
"description": "列出本插件支持的 Envi3D 自定义实体(管道/墙/板/柱/梁),分页返回 total/returned/offset/items,每项含 handle、类型、图层、起终点、包围盒。改图之前先用它拿 handle。",
"inputSchema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"all",
"pipe",
"wall",
"slab",
"column",
"beam"
],
"description": "要列出的类型,缺省 all"
},
"space": {
"type": "string",
"description": "空间:\"Model\" 或布局名,缺省 Model"
},
"limit": {
"type": "integer",
"description": "最多返回多少条,缺省 200,上限 1000"
},
"offset": {
"type": "integer",
"description": "分页偏移,缺省 0"
}
}
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "ListAecEntitiesTool"
}
},
{
"name": "get_aec_entity_detail",
"description": "按 handle 取单个 Envi3D 实体的详细参数:类型、图层、起终点、包围盒,以及该类型的关键尺寸(管道 DN/外径/壁厚;墙 厚/高/底标高/对齐;板 厚/底标高;柱 高/截面/转角;梁 截面)。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string",
"description": "实体句柄(十六进制字符串)"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "GetAecEntityTool"
}
},
{
"name": "add_aec_pipe",
"description": "新建 Envi3D 管道(AecDbEwPipe):给起点、终点与公称直径 DN。坐标用图纸单位,dn_mm/od_mm/wall_thickness_mm 用毫米。返回新实体的 handle。",
"inputSchema": {
"type": "object",
"properties": {
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "起点 [x,y] 或 [x,y,z],图纸单位"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "终点 [x,y] 或 [x,y,z]"
},
"dn_mm": {
"type": "number",
"description": "公称直径 DN,毫米"
},
"od_mm": {
"type": "number",
"description": "外径,毫米(缺省不写)"
},
"wall_thickness_mm": {
"type": "number",
"description": "壁厚,毫米(缺省不写)"
},
"system": {
"type": "string",
"description": "管道系统名,如 给水/排水"
},
"material": {
"type": "string",
"description": "材质名"
},
"color": {
"type": "integer",
"description": "ACI 颜色号,256=ByLayer"
},
"layer": {
"type": "string",
"description": "图层名,缺省用当前图层"
},
"space": {
"type": "string",
"description": "空间:\"Model\" 或布局名,缺省 Model"
}
},
"required": [
"start",
"end",
"dn_mm"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "CreateAecPipeTool"
}
},
{
"name": "update_aec_pipe",
"description": "修改已有管道:只传要改的字段,未传的保持原值。改 dn_mm 会重建截面;改起终点只给一端时,另一端沿用实体现有端点。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "新起点(可选)"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "新终点(可选)"
},
"dn_mm": {
"type": "number",
"description": "新公称直径,毫米(可选)"
},
"od_mm": {
"type": "number",
"description": "新外径,毫米(可选)"
},
"wall_thickness_mm": {
"type": "number",
"description": "新壁厚,毫米(可选)"
},
"system": {
"type": "string",
"description": "管道系统名(可选)"
},
"material": {
"type": "string",
"description": "材质(可选)"
},
"color": {
"type": "integer",
"description": "ACI 颜色号,256=ByLayer"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "UpdateAecPipeTool"
}
},
{
"name": "add_aec_wall",
"description": "新建 Envi3D 墙体(AecDbXWall):沿 start→end 建墙,给墙厚、墙高、墙底标高,align 控制墙厚在基线哪一侧。尺寸用图纸单位。返回新实体的 handle。",
"inputSchema": {
"type": "object",
"properties": {
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "墙基线起点 [x,y] 或 [x,y,z]"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "墙基线终点"
},
"thickness": {
"type": "number",
"description": "墙厚,图纸单位"
},
"height": {
"type": "number",
"description": "墙高,图纸单位"
},
"bottom_elevation": {
"type": "number",
"description": "墙底标高,缺省 0"
},
"align": {
"type": "string",
"enum": [
"left",
"center",
"right"
],
"description": "对齐,缺省 center"
},
"material": {
"type": "string",
"description": "材质"
},
"layer": {
"type": "string",
"description": "图层名,缺省用当前图层"
},
"space": {
"type": "string",
"description": "空间:\"Model\" 或布局名,缺省 Model"
}
},
"required": [
"start",
"end",
"thickness",
"height"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "CreateAecWallTool"
}
},
{
"name": "update_aec_wall",
"description": "修改已有墙体:只传要改的字段(起终点、墙厚、墙高、底标高、对齐、材质)。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "新起点(可选)"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "新终点(可选)"
},
"thickness": {
"type": "number",
"description": "新墙厚(可选)"
},
"height": {
"type": "number",
"description": "新墙高(可选)"
},
"bottom_elevation": {
"type": "number",
"description": "新墙底标高(可选)"
},
"align": {
"type": "string",
"enum": [
"left",
"center",
"right"
],
"description": "对齐(可选)"
},
"material": {
"type": "string",
"description": "材质(可选)"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "UpdateAecWallTool"
}
},
{
"name": "add_aec_slab",
"description": "新建 Envi3D 板/底板(AecDbXSlab):points 是水平轮廓 [[x,y],...](至少 3 点,可不闭合),给板厚与板底标高。尺寸用图纸单位。返回新实体的 handle。",
"inputSchema": {
"type": "object",
"properties": {
"points": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "轮廓点串 [[x,y],...],至少 3 个"
},
"thickness": {
"type": "number",
"description": "板厚,图纸单位"
},
"bottom_elevation": {
"type": "number",
"description": "板底标高,缺省 0"
},
"center": {
"type": "array",
"items": {
"type": "number"
},
"description": "位置参考点,缺省取点串平均值"
},
"material": {
"type": "string",
"description": "材质"
},
"layer": {
"type": "string",
"description": "图层名,缺省用当前图层"
},
"space": {
"type": "string",
"description": "空间:\"Model\" 或布局名,缺省 Model"
}
},
"required": [
"points",
"thickness"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "CreateAecSlabTool"
}
},
{
"name": "update_aec_slab",
"description": "修改已有板:给 points 会重做轮廓;不给 points 时按已存轮廓只改板厚/板底标高/材质。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"points": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "新轮廓点串(可选)"
},
"thickness": {
"type": "number",
"description": "新板厚(可选)"
},
"bottom_elevation": {
"type": "number",
"description": "新板底标高(可选)"
},
"center": {
"type": "array",
"items": {
"type": "number"
},
"description": "参考点(可选)"
},
"material": {
"type": "string",
"description": "材质(可选)"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "UpdateAecSlabTool"
}
},
{
"name": "add_aec_column",
"description": "新建矩形柱(AecDbColumn):position 是柱底中心点,给柱高与截面长宽,可选绕 Z 轴转角(度)。尺寸用图纸单位。返回新实体的 handle。",
"inputSchema": {
"type": "object",
"properties": {
"position": {
"type": "array",
"items": {
"type": "number"
},
"description": "柱底中心点 [x,y] 或 [x,y,z]"
},
"height": {
"type": "number",
"description": "柱高,图纸单位"
},
"length": {
"type": "number",
"description": "截面长(X 向),图纸单位"
},
"width": {
"type": "number",
"description": "截面宽(Y 向),图纸单位"
},
"rotation_deg": {
"type": "number",
"description": "绕 Z 轴转角(度),缺省 0"
},
"material": {
"type": "string",
"description": "材质"
},
"layer": {
"type": "string",
"description": "图层名,缺省用当前图层"
},
"space": {
"type": "string",
"description": "空间:\"Model\" 或布局名,缺省 Model"
}
},
"required": [
"position",
"height",
"length",
"width"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "CreateAecColumnTool"
}
},
{
"name": "update_aec_column",
"description": "修改已有柱:只传要改的字段(位置、柱高、截面长宽、转角、材质)。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"position": {
"type": "array",
"items": {
"type": "number"
},
"description": "新柱底中心点(可选)"
},
"height": {
"type": "number",
"description": "新柱高(可选)"
},
"length": {
"type": "number",
"description": "新截面长(可选)"
},
"width": {
"type": "number",
"description": "新截面宽(可选)"
},
"rotation_deg": {
"type": "number",
"description": "新转角(可选)"
},
"material": {
"type": "string",
"description": "材质(可选)"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "UpdateAecColumnTool"
}
},
{
"name": "add_aec_beam",
"description": "新建梁(AecDbBeam):沿 start→end 建梁,给截面宽与高。尺寸用图纸单位。返回新实体的 handle。",
"inputSchema": {
"type": "object",
"properties": {
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "梁起点 [x,y] 或 [x,y,z]"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "梁终点"
},
"width": {
"type": "number",
"description": "梁宽,图纸单位"
},
"height": {
"type": "number",
"description": "梁高,图纸单位"
},
"material": {
"type": "string",
"description": "材质"
},
"layer": {
"type": "string",
"description": "图层名,缺省用当前图层"
},
"space": {
"type": "string",
"description": "空间:\"Model\" 或布局名,缺省 Model"
}
},
"required": [
"start",
"end",
"width",
"height"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "CreateAecBeamTool"
}
},
{
"name": "update_aec_beam",
"description": "修改已有梁:只传要改的字段(起终点、截面宽高、材质)。",
"inputSchema": {
"type": "object",
"properties": {
"handle": {
"type": "string"
},
"start": {
"type": "array",
"items": {
"type": "number"
},
"description": "新起点(可选)"
},
"end": {
"type": "array",
"items": {
"type": "number"
},
"description": "新终点(可选)"
},
"width": {
"type": "number",
"description": "新梁宽(可选)"
},
"height": {
"type": "number",
"description": "新梁高(可选)"
},
"material": {
"type": "string",
"description": "材质(可选)"
}
},
"required": [
"handle"
]
},
"backend": {
"type": "c++_dll",
"dll_name": "cad_mcp_aec.dll",
"factory_function": "UpdateAecBeamTool"
}
}
]
}