Skip to main content
Glama
ZedMoster

Revit MCP Server

by ZedMoster

create_walls

Create walls in Revit with batch processing, automatic unit conversion from millimeters to feet, and wall type matching based on thickness parameters.

Instructions

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

特性:

  • 支持批量创建多个墙体

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

  • 自动创建或匹配符合厚度的墙类型

  • 支持指定标高或使用默认标高

  • 完善的错误处理机制

参数: ctx (Context): FastMCP上下文对象 method (str): JSON-RPC方法名,默认为"CreateWalls" params (List[Dict]): 墙体参数列表,每个字典包含: - startX (float): 起点X坐标(毫米) - startY (float): 起点Y坐标(毫米) - endX (float): 终点X坐标(毫米) - endY (float): 终点Y坐标(毫米) - height (float): 墙体高度(毫米) - width (float): 墙体厚度(毫米) - elevation (float, optional): 墙体底部标高(毫米,默认为0)

返回: 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_walls(ctx, params=[ {"startX": 0, "startY": 0, "endX": 5000, "endY": 0, "height": 3000, "width": 200}, {"startX": 5000, "startY": 0, "endX": 5000, "endY": 5000, "height": 3000, "width": 200, "elevation": 1000} ])

# 返回示例
{
    "jsonrpc": "2.0",
    "result": [
        {
            "elementId": "123456",
            "name": "基本墙",
            "familyName": "基本墙"
        },
        {
            "elementId": "123457",
            "name": "基本墙",
            "familyName": "基本墙"
        }
    ],
    "id": 1
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoCreateWalls
paramsNo

Implementation Reference

  • create_walls tool is listed in ARCHITECTURAL_TOOLS for MCP server registration
    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
    ]
  • Loop that applies @server.tool() decorator to register create_walls and other architectural tools to the MCP server
    # 注册建筑工具
    for tool in ARCHITECTURAL_TOOLS:
        server.tool()(tool)
  • Usage guidance for create_walls tool in asset creation strategy prompt
    - 使用create_walls()创建墙体,注意指定正确的起点、终点、高度和宽度
  • Import statement that brings in create_walls function from tools module (file not found in codebase)
    from .tools import *
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 at disclosing behavioral traits. It describes automatic unit conversion (millimeters to feet), automatic wall type matching based on thickness, elevation handling with defaults, and comprehensive error handling. However, it doesn't mention whether this is a destructive operation (creates new elements) or any permission requirements, though 'create' implies mutation. The JSON-RPC format specification is also useful behavioral context.

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 is quite lengthy with multiple paragraphs and a detailed example. While all content is relevant, it could be more front-loaded with the core purpose. The technical note about 'mcp_tool使用时params不要有任何注释信息' seems out of place and doesn't add value for AI agent understanding. The example is helpful but extensive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a batch creation tool with no annotations and no output schema, the description provides excellent completeness. It fully explains the tool's behavior, documents all parameters in detail, shows the complete return structure for both success and failure cases, and includes a practical example. For a mutation tool with rich functionality, this description gives the agent everything needed to understand and invoke it correctly.

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 'method' and 'params' as generic objects), the description provides excellent parameter semantics compensation. It fully documents the params structure with detailed field explanations for startX, startY, endX, endY, height, width, and elevation including units (millimeters), optional status, and defaults. The description adds substantial value beyond the minimal schema, making parameters completely understandable.

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 walls in Revit, supports batch creation). It specifies the exact action (create walls), the target resource (walls in Revit), and distinguishes from siblings like create_floors or create_rooms by focusing specifically on walls. The description goes beyond just restating the name by adding context about batch creation and Revit environment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through the mention of Revit and batch creation, but doesn't explicitly state when to use this tool versus alternatives. While it distinguishes from siblings by focusing on walls, it doesn't provide guidance on when to choose create_walls over other wall-related tools (none listed in siblings) or when batch creation is preferable to individual operations. The JSON-RPC specification note is technical but doesn't guide usage decisions.

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