Skip to main content
Glama

create_point_based_element

Add point-based elements like doors, windows, or furniture to Revit models. Specify family type, position, dimensions, and level data for batch creation in millimeters.

Instructions

Create one or more point-based elements in Revit such as doors, windows, or furniture. Supports batch creation with detailed parameters including family type ID, position, dimensions, and level information. All units are in millimeters (mm).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesArray of point-based elements to create

Implementation Reference

  • Handler function that forwards the input parameters to the Revit client using sendCommand('create_point_based_element', params) and returns the response or error.
    async (args, extra) => {
      const params = args;
    
      try {
        const response = await withRevitConnection(async (revitClient) => {
          return await revitClient.sendCommand(
            "create_point_based_element",
            params
          );
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Create point-based element failed: ${
                error instanceof Error ? error.message : String(error)
              }`,
            },
          ],
        };
      }
    }
  • Zod schema for the tool input: an array of objects specifying element details like name, typeId (optional), locationPoint (x,y,z), width, depth (opt), height, baseLevel, baseOffset, rotation (opt). Units in mm.
      data: z
        .array(
          z.object({
            name: z
              .string()
              .describe("Description of the element (e.g., door, window)"),
            typeId: z
              .number()
              .optional()
              .describe("The ID of the family type to create."),
            locationPoint: z
              .object({
                x: z.number().describe("X coordinate"),
                y: z.number().describe("Y coordinate"),
                z: z.number().describe("Z coordinate"),
              })
              .describe(
                "The position coordinates where the element will be placed"
              ),
            width: z.number().describe("Width of the element in mm"),
            depth: z.number().optional().describe("Depth of the element in mm"),
            height: z.number().describe("Height of the element in mm"),
            baseLevel: z.number().describe("Base level height"),
            baseOffset: z.number().describe("Offset from the base level"),
            rotation: z
              .number()
              .optional()
              .describe("Rotation angle in degrees (0-360)"),
          })
        )
        .describe("Array of point-based elements to create"),
    },
  • Registration function exported as registerCreatePointBasedElementTool, called dynamically from src/tools/register.ts, which registers the tool on the McpServer with name, description, schema, and handler.
    export function registerCreatePointBasedElementTool(server: McpServer) {
      server.tool(
        "create_point_based_element",
        "Create one or more point-based elements in Revit such as doors, windows, or furniture. Supports batch creation with detailed parameters including family type ID, position, dimensions, and level information. All units are in millimeters (mm).",
        {
          data: z
            .array(
              z.object({
                name: z
                  .string()
                  .describe("Description of the element (e.g., door, window)"),
                typeId: z
                  .number()
                  .optional()
                  .describe("The ID of the family type to create."),
                locationPoint: z
                  .object({
                    x: z.number().describe("X coordinate"),
                    y: z.number().describe("Y coordinate"),
                    z: z.number().describe("Z coordinate"),
                  })
                  .describe(
                    "The position coordinates where the element will be placed"
                  ),
                width: z.number().describe("Width of the element in mm"),
                depth: z.number().optional().describe("Depth of the element in mm"),
                height: z.number().describe("Height of the element in mm"),
                baseLevel: z.number().describe("Base level height"),
                baseOffset: z.number().describe("Offset from the base level"),
                rotation: z
                  .number()
                  .optional()
                  .describe("Rotation angle in degrees (0-360)"),
              })
            )
            .describe("Array of point-based elements to create"),
        },
        async (args, extra) => {
          const params = args;
    
          try {
            const response = await withRevitConnection(async (revitClient) => {
              return await revitClient.sendCommand(
                "create_point_based_element",
                params
              );
            });
    
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify(response, null, 2),
                },
              ],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Create point-based element failed: ${
                    error instanceof Error ? error.message : String(error)
                  }`,
                },
              ],
            };
          }
        }
      );
    }
Behavior3/5

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

With no annotations, the description carries full burden. It states the tool creates elements (implying mutation) and mentions batch creation and units, but doesn't disclose permissions needed, whether changes are reversible, error handling, or response format. It adds some context but lacks comprehensive behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and efficiently covers key features in two sentences. It avoids redundancy but could be slightly more structured by separating usage context from technical details.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description is adequate but incomplete. It covers what the tool does and basic parameters, but lacks details on permissions, error cases, return values, or integration with sibling tools like get_available_family_types.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents the single parameter 'data' and its nested properties. The description adds minimal value by mentioning batch creation and units (mm), but doesn't provide additional semantics beyond what the schema already covers. Baseline 3 is appropriate.

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 creates point-based elements in Revit with specific examples (doors, windows, furniture), distinguishes it from siblings like create_line_based_element and create_surface_based_element, and specifies batch creation capability.

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 for creating point-based elements but doesn't explicitly state when to use this versus alternatives like create_line_based_element or create_surface_based_element. No guidance on prerequisites or exclusions is provided.

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/mcp-servers-for-revit/revit-mcp'

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