Skip to main content
Glama
ZedMoster

Revit MCP Server

by ZedMoster

create_floors

Create floors in Revit by defining boundary points, specifying floor types, and setting structural properties for batch processing in building models.

Instructions

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

特性:

  • 支持批量创建多个楼板

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

  • 自动匹配楼板类型或使用默认类型

  • 支持结构楼板和非结构楼板

  • 自动根据z值标高确定楼层

  • 完善的错误处理机制

参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateFloors" params (List[Dict]): 楼板参数列表,每个字典包含: - boundaryPoints (List[Dict]): 楼板边界点列表,每个点包含: - x (float): X坐标(毫米) - y (float): Y坐标(毫米) - z (float): Z坐标(毫米) - floorTypeName (str, optional): 楼板类型名称(可选) - structural (bool, optional): 是否为结构楼板(默认为False)

返回: 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_floors(ctx, params=[ { "boundaryPoints": [ {"x": 0, "y": 0, "z": 0}, {"x": 5000, "y": 0, "z": 0}, {"x": 5000, "y": 5000, "z": 0}, {"x": 0, "y": 5000, "z": 0}, {"x": 0, "y": 0, "z": 0} ], "floorTypeName": "常规 - 150mm", "structural": True }, { "boundaryPoints": [ {"x": 0, "y": 0, "z": 3000}, {"x": 5000, "y": 0, "z": 3000}, {"x": 5000, "y": 5000, "z": 3000}, {"x": 0, "y": 5000, "z": 3000}, {"x": 0, "y": 0, "z": 3000} ], "floorTypeName": "常规 - 200mm" } ])

# 输出示例
{
    "jsonrpc": "2.0",
    "result": [213001, 213002],
    "id": 1
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoCreateFloors
paramsNo

Implementation Reference

  • The tool 'create_floors' is included in the ARCHITECTURAL_TOOLS list, which is used to register tools with the MCP server via server.tool() in register_tools function.
    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
    ]
  • Registration loop that applies server.tool() decorator to create_floors among other architectural tools.
    # 注册建筑工具
    for tool in ARCHITECTURAL_TOOLS:
        server.tool()(tool)
  • Test script demonstrating the expected input format for CreateFloors RPC method on Revit side: list of dicts with boundaryPoints, floorTypeName, structural.
    # 构造 JSON-RPC 请求
    json_rpc_request = {
        "jsonrpc": "2.0",
        "method": "CreateFloors",
        "params": data,
    }
    
    # 发送更新元素数据
    send_tcp_data(json_rpc_request)
  • Prompt mentioning usage of create_floors() for creating floors with closed boundary loops.
    - 使用create_floors()创建楼板,确保边界点形成封闭环路
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing multiple behavioral traits: batch creation capability, automatic unit conversion (millimeters to feet), automatic floor type matching, support for structural/non-structural floors, automatic floor level determination from Z-values, and comprehensive error handling. This provides substantial context beyond basic functionality.

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 (特性, 参数, 返回, 示例), but contains some redundancy. The JSON-RPC specification mention appears twice, and the example output shows a different structure than described in the '返回' section (showing numeric IDs vs described object format). Some sentences could be more concise.

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?

For a complex creation tool with no annotations and no output schema, the description provides substantial context. It covers functionality, parameters, return format, and includes a comprehensive example. The main gap is the lack of usage guidelines relative to sibling tools, but otherwise it's quite complete for understanding how to use the tool effectively.

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?

With 0% schema description coverage (schema only shows generic 'method' and 'params' with no details), the description fully compensates by providing detailed parameter documentation. It explains the 'params' array structure, documents all nested fields (boundaryPoints with x/y/z coordinates, floorTypeName, structural flag), specifies units (millimeters), defaults (structural defaults to False), and optional parameters.

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 floors in Revit, supports batch creation). It specifies the verb ('创建楼板' - create floors), resource (Revit), and distinguishes from siblings like create_walls or create_levels by focusing on floor creation specifically.

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. While it mentions batch creation and unit conversion, it doesn't explain when to choose create_floors over other creation tools like create_walls or create_rooms, nor does it mention prerequisites or constraints for floor creation in Revit.

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