Skip to main content
Glama

tag_all_walls

Automatically create tags for all walls in the current Revit view, placing them at each wall's midpoint. Configure tag types and leader lines as needed.

Instructions

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

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the 'tag_all_walls' tool by connecting to Revit and sending the 'tag_walls' command with parameters.
    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) }`, }, ], }; } }
  • Input schema definition for the 'tag_all_walls' tool using Zod, defining optional parameters useLeader and tagTypeId.
    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 for the 'tag_all_walls' tool, called dynamically from src/tools/register.ts, which sets up the tool name, description, schema, and handler on the MCP server.
    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/ideook/revit-mcp'

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