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
| Name | Required | Description | Default |
|---|---|---|---|
| useLeader | No | Whether to use a leader line when creating the tags | |
| tagTypeId | No | The ID of the specific wall tag family type to use. If not provided, the default wall tag type will be used |
Implementation Reference
- src/tools/tag_all_walls.ts:20-47 (handler)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) }`, }, ], }; } }
- src/tools/tag_all_walls.ts:9-19 (schema)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"), },
- src/tools/tag_all_walls.ts:5-49 (registration)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) }`, }, ], }; } } ); }