Skip to main content
Glama

tag_all_walls

Automatically generates tags for all walls in the active Revit view, placing them at each wall's midpoint. Optionally customize tag types and use leader lines for clarity.

Instructions

Create tags for all walls in the current active view. Tags will be placed at the middle point of each wall.

Input Schema

NameRequiredDescriptionDefault
tagTypeIdNoThe ID of the specific wall tag family type to use. If not provided, the default wall tag type will be used
useLeaderNoWhether to use a leader line when creating the tags

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "tagTypeId": { "description": "The ID of the specific wall tag family type to use. If not provided, the default wall tag type will be used", "type": "string" }, "useLeader": { "default": false, "description": "Whether to use a leader line when creating the tags", "type": "boolean" } }, "type": "object" }

Implementation Reference

  • The handler function for the 'tag_all_walls' tool. It extracts parameters, uses withRevitConnection to send a 'tag_walls' command to the Revit client, and returns the response or error message.
    async (args, extra) => { const params = args; try { const response = await withRevitConnection(async (revitClient) => { return await revitClient.sendCommand("tag_walls", params); }); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Wall tagging failed: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • Zod schema defining the input parameters for the tool: useLeader (optional boolean, defaults to false) and tagTypeId (optional string).
    { useLeader: z .boolean() .optional() .default(false) .describe("Whether to use a leader line when creating the tags"), tagTypeId: z .string() .optional() .describe("The ID of the specific wall tag family type to use. If not provided, the default wall tag type will be used"), },
  • The registration function registerTagAllWallsTool that sets up the 'tag_all_walls' tool on the MCP server, including name, description, input schema, and handler. This function is dynamically called during tool registration in src/tools/register.ts.
    export function registerTagAllWallsTool(server: McpServer) { server.tool( "tag_all_walls", "Create tags for all walls in the current active view. Tags will be placed at the middle point of each wall.", { useLeader: z .boolean() .optional() .default(false) .describe("Whether to use a leader line when creating the tags"), tagTypeId: z .string() .optional() .describe("The ID of the specific wall tag family type to use. If not provided, the default wall tag type will be used"), }, async (args, extra) => { const params = args; try { const response = await withRevitConnection(async (revitClient) => { return await revitClient.sendCommand("tag_walls", params); }); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Wall tagging failed: ${ error instanceof Error ? error.message : String(error) }`, }, ], }; } } ); }

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

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