Skip to main content
Glama
ZedMoster

Revit MCP Server

by ZedMoster

create_door_windows

Create door and window family instances in Revit with batch processing, automatic unit conversion, and precise placement on walls using coordinates.

Instructions

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

特性:

  • 支持批量创建多个门窗族实例

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

  • 支持指定族类型和类别

  • 支持指定主体墙ElementId

  • 完善的错误处理机制

参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateDoorWindows" params (List[Dict]): 门窗参数列表,每个字典包含: - categoryName (str): 类别名称(门或窗) - familyName (str): 族名称 - name (str): 类型名称 - startX (float): 放置点X坐标(毫米) - startY (float): 放置点Y坐标(毫米) - startZ (float): 放置点Z坐标(毫米) - hostId (str): 主体墙的ElementId - offset (str, optional): 底高度偏移值

返回: 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_door_windows(ctx, params=[ { "categoryName": "门", "familyName": "单扇门", "name": "915 x 2134mm", "startX": 5000, "startY": 2500, "startZ": 0, "hostId": "123456", "offset": "0" }, { "categoryName": "窗", "familyName": "固定窗", "name": "0915 x 1220mm", "startX": 8000, "startY": 2500, "startZ": 1000, "hostId": "123456", "offset": "900" } ])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoCreateDoorWindows
paramsNo

Implementation Reference

  • The tool 'create_door_windows' is included in the ARCHITECTURAL_TOOLS list used for registering MCP tools.
    ARCHITECTURAL_TOOLS = [
        create_levels, create_floor_plan_views, create_grids, create_walls, create_floors,
        create_door_windows, create_rooms, create_room_tags, create_family_instances, create_sheets
    ]
  • Architectural tools, including create_door_windows, are registered to the FastMCP server using server.tool() decorator.
    for tool in ARCHITECTURAL_TOOLS:
        server.tool()(tool)
  • Prompt documentation instructs to use create_door_windows() to create doors and windows on walls.
    - 使用create_door_windows()在墙体上创建门窗
      注意:门窗族需要指定宿主墙,所以必须先有墙再创建门窗
  • The register_tools function is called to register all tools including create_door_windows.
    register_tools(mcp)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions several behavioral traits: batch creation capability, automatic unit conversion (millimeters to feet), support for specifying family types/categories/host walls, and comprehensive error handling. However, it doesn't address important behavioral aspects like whether this is a read-only or destructive operation, what permissions are required, or any rate limits/performance considerations.

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 well-structured with clear sections (特性/features, 参数/parameters, 返回/return, 示例/example), but it's quite lengthy. The JSON-RPC specification note and 'mcp_tool使用时params不要有任何注释信息' (when using mcp_tool, params should not have any comment information) seem unnecessary for tool selection. The example is comprehensive but could be more concise while still being helpful.

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 complexity (batch creation with multiple parameters), no annotations, and no output schema, the description does an excellent job of explaining what the tool does, its parameters, and return format. The detailed return structure documentation compensates for the missing output schema. The main gap is lack of usage guidelines compared to sibling tools, but otherwise this is quite complete for a creation tool.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It provides extensive parameter documentation: explains the two main parameters (method and params), details all 8+ fields within the params array (categoryName, familyName, name, startX/Y/Z, hostId, offset), including data types, units (millimeters), and optional status. This goes far beyond what the minimal input schema provides and gives the agent complete understanding of parameter requirements.

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: '在Revit中创建门窗族实例,支持批量创建' (Create door/window family instances in Revit, supports batch creation). It specifies the exact action (创建/creation), resource (门窗族实例/door-window family instances), and distinguishes from siblings like create_walls, create_floors, etc. by focusing specifically on doors and windows.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose create_door_windows over create_family_instances (which appears to be a more general sibling tool) or other creation tools. There's no discussion of prerequisites, constraints, or appropriate contexts for this specific door/window creation functionality.

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

Install Server

Other Tools

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