Skip to main content
Glama

create_pipes

Generate and batch-create pipes in Revit with precise coordinates, diameter, and system matching, automating unit conversion and error handling for efficient workflow.

Instructions

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

特性:

  • 支持批量创建多个管道

  • 自动处理单位转换(毫米转英尺)

  • 自动匹配管道类型和系统类型

  • 支持指定管道直径

  • 完善的错误处理机制

参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreatePipes" params (List[Dict]): 管道参数列表,每个字典包含: - pipeTypeName (str): 管道类型名称 - systemTypeName (str): 管道系统类型名称 - startX (float): 起点X坐标(毫米) - startY (float): 起点Y坐标(毫米) - startZ (float): 起点Z坐标(毫米) - endX (float): 终点X坐标(毫米) - endY (float): 终点Y坐标(毫米) - endZ (float): 终点Z坐标(毫米) - diameter (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_pipes(ctx, params=[ { "pipeTypeName": "默认", "systemTypeName": "循环供水", "startX": 0, "startY": 0, "startZ": 3000, "endX": 5000, "endY": 0, "endZ": 3000, "diameter": 50 }, { "pipeTypeName": "标准", "systemTypeName": "生活热水", "startX": 5000, "startY": 0, "startZ": 3000, "endX": 5000, "endY": 5000, "endZ": 3000, "diameter": 40 } ])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoCreatePipes
paramsNo

Implementation Reference

  • Defines MEP_TOOLS list containing the create_pipes tool function, imported from .tools
    MEP_TOOLS = [ create_ducts, create_pipes, create_cable_trays ]
  • Registers all MEP tools (including create_pipes) to the MCP server via the server.tool() decorator
    # 注册MEP工具 for tool in MEP_TOOLS: server.tool()(tool)
  • Dynamically extracts input schema for create_pipes and other MEP tools using inspect.signature for tool listing
    # 获取MEP工具信息 for tool in MEP_TOOLS: sig = inspect.signature(tool) params = [] for param_name, param in sig.parameters.items(): if param_name != 'ctx': param_info = { "name": param_name, "required": param.default == inspect.Parameter.empty, "default": None if param.default == inspect.Parameter.empty else param.default } params.append(param_info) doc = inspect.getdoc(tool) description = doc.split('\n')[0] if doc else "无描述" tool_info = { "name": tool.__name__, "description": description, "full_doc": doc, "parameters": params } tools_info["mep"].append(tool_info)
  • Prompt documentation instructing usage of create_pipes() for creating pipes in Revit
    - 使用create_ducts()创建风管 - 使用create_pipes()创建管道
  • Imports the create_pipes function (and other tools) from the .tools module
    from .tools import *

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZedMoster/revit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server