Revit MCP Server

by ZedMoster
Verified

create_ducts

Generate and manage duct systems in Revit by specifying dimensions, coordinates, and types. Automates unit conversion, type matching, and handles bulk creation for efficient workflow integration.

Instructions

在Revit中创建风管,支持批量创建,遵循JSON-RPC 2.0规范。 mcp_tool使用时params不要有任何注释信息

特性:

  • 支持批量创建多个风管
  • 自动处理单位转换(毫米转英尺)
  • 自动匹配风管类型和系统类型
  • 支持指定风管尺寸
  • 完善的错误处理机制

参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateDucts" params (List[Dict]): 风管参数列表,每个字典包含: - ductTypeName (str): 风管类型名称 - systemTypeName (str): 风管系统类型名称 - startX (float): 起点X坐标(毫米) - startY (float): 起点Y坐标(毫米) - startZ (float): 起点Z坐标(毫米) - endX (float): 终点X坐标(毫米) - endY (float): 终点Y坐标(毫米) - endZ (float): 终点Z坐标(毫米) - width (float): 风管宽度(毫米) - height (float): 风管高度(毫米)

返回: dict: JSON-RPC 2.0格式的响应,结构为: 成功时: { "jsonrpc": "2.0", "result": [ { "elementId": "元素ID", "name": "名称", "familyName": "族名称" }, ... ], "id": request_id } 失败时: { "jsonrpc": "2.0", "error": { "code": int, "message": str, "data": any }, "id": request_id }

示例: response = create_ducts(ctx, params=[ { "ductTypeName": "默认", "systemTypeName": "送风", "startX": 0, "startY": 0, "startZ": 3000, "endX": 5000, "endY": 0, "endZ": 3000, "width": 300, "height": 200 }, { "ductTypeName": "矩形风管", "systemTypeName": "送风", "startX": 5000, "startY": 0, "startZ": 3000, "endX": 5000, "endY": 5000, "endZ": 3000, "width": 300, "height": 200 } ])

Input Schema

NameRequiredDescriptionDefault
methodNoCreateDucts
paramsNo

Input Schema (JSON Schema)

{ "properties": { "method": { "default": "CreateDucts", "title": "Method", "type": "string" }, "params": { "default": null, "items": { "additionalProperties": true, "type": "object" }, "title": "Params", "type": "array" } }, "title": "create_ductsArguments", "type": "object" }
ID: 4dgua6bhbf