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. Specify tag types and leader line usage for precise documentation.

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 for the 'tag_all_walls' tool. Connects to Revit using withRevitConnection and sends the 'tag_walls' command with the provided parameters, returning 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) }`, }, ], }; } }
  • Input schema for the 'tag_all_walls' tool, defining optional parameters useLeader (boolean, default false) and tagTypeId (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"), },
  • Registers the 'tag_all_walls' tool on the MCP server using server.tool(), providing name, description, input schema, and handler function. This function is dynamically called from 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