MCP Tools¶
The 7 unified MCP tools exposed to Claude (or any MCP client). Each tool uses a shorthand dispatch format to handle multiple operations in a single call.
draw_entities¶
mcp_tools.tools.drawing
¶
Unified drawing tool for creating geometric entities.
Replaces 10 individual drawing tools with a single draw_entities tool
that accepts a simple shorthand format for ~85% token reduction.
SHORTHAND FORMAT (one per line): line|start|end|color|layer → line|0,0|10,10|red|walls circle|center|radius|color → circle|5,5|3|blue rect|corner1|corner2|color → rect|0,0|20,15 text|pos|text|height|color → text|5,5|Hello|2.5 arc|center|radius|start|end → arc|0,0|5|0|90 polyline|points(;)|closed|color → polyline|0,0;10,10;20,0|closed spline|points(;)|closed|color → spline|0,0;5,10;10,0 leader|points|text|height|color|layer|type → leader|0,0;10,10;20,10|Mi nota|2.5|red leader|group1~~group2~~...|text|height|color|layer → leader|0,0;10,10~~0,0;-10,10|Nota
DEFAULTS: color=white, layer=0
IMPORTANT for Leaders:
- Points order: [ArrowHead, ..., TextPosition]
- First point is where the arrow starts. Last point is where the text attaches.
- Use '~~' to separate multiple arrow groups.
- Each group must have at least 2 points.
Examples:
Single arrow: leader|10,10;50,50|Label
-> Arrow at 10,10, Text at 50,50
Multi arrow: leader|10,10;50,50~~10,90;50,50|Label
-> Arrow 1 at 10,10, Arrow 2 at 10,90
-> Both converge to Text at 50,50
register_drawing_tools
¶
Register the unified draw_entities tool with FastMCP.
manage_layers¶
mcp_tools.tools.layers
¶
Unified layer management tool.
Single manage_layers tool replaces all 9 legacy layer tools with a simple shorthand format for ~85% token reduction.
SHORTHAND FORMAT (one per line): create|name|color|lineweight → create|walls|red|50 delete|name → delete|temp rename|old|new → rename|Layer1|furniture on|names(,sep) → on|walls,doors off|names(,sep) → off|Defpoints set_color|name|color → set_color|0|white list → list info → info
register_layer_tools
¶
Register unified layer management tool with FastMCP.
manage_blocks¶
mcp_tools.tools.blocks
¶
Unified block management tool.
Single manage_blocks tool replaces all 7 legacy block tools with a simple shorthand format for ~85% token reduction.
SHORTHAND FORMAT (one per line): list → list info|block_name|include → info|Door|both insert|name|point|scale|rotation|layer|color → insert|Door|10,20|1.5|90|walls|red create|name|handles|point|description → create|MyBlock|A1,B2|0,0|Desc get_attrs|handle → get_attrs|A1B2C3 set_attrs|handle|attributes_json → set_attrs|A1B2C3|{"TAG": "value"}
register_block_tools
¶
Register unified block management tool with FastMCP.
manage_entities¶
mcp_tools.tools.entities
¶
Unified entity management tool.
Single manage_entities tool replaces 13 legacy entity tools with a simple shorthand format for ~85% token reduction.
SHORTHAND FORMAT (one per line): select|by|value → select|layer|walls move|handles|offset_x|offset_y → move|A1,B2|10|5 rotate|handles|angle|cx|cy → rotate|A1|45|0|0 scale|handles|factor|cx|cy → scale|A1|2.0|0|0 set_color|handles|color → set_color|A1,B2|red set_layer|handles|layer → set_layer|A1|walls copy|handles → copy|A1,B2 delete|handles → delete|A1,B2
register_entity_tools
¶
Register unified entity management tool with FastMCP.
manage_files¶
mcp_tools.tools.files
¶
Unified file management tool.
Replaces 5 individual tools with 1 using a simple shorthand format for ~85% token reduction.
SHORTHAND FORMAT (one per line): save|path_or_filename|format → save|/path/to/file.dwg save|filename → save|backup.dwg new → new close|save_changes → close|true list → list switch|drawing_name → switch|floor_plan.dwg
manage_session¶
mcp_tools.tools.session
¶
Unified session management tool.
Replaces 7 individual tools with 1: - manage_session: connect_cad, disconnect_cad, list_supported_cads, get_connection_status, zoom_extents, undo, redo (7→1)
Covers all non-content operations: connection lifecycle, view, and history.
register_session_tools
¶
Register unified session management tool with FastMCP.
export_data¶
mcp_tools.tools.export
¶
Unified export tool.
Replaces 4 individual tools with 1: - export_data: export_drawing_to_excel, extract_drawing_data, export_selected_to_excel, extract_selected_data (4→1)
Two dimensions
scope: "all" or "selected" format: "json" or "excel"