Skip to main content
Glama

drawing_add

Add multiple entities to a drawing as a batch and return their new IDs. Supports lines, polylines, walls, openings, grids, and text with per-drawing defaults applied.

Instructions

Add entities to a drawing (batch). Returns the new ids. defaults applies lg/ly/lc/lt to every entity that does not set them. entities: list of objects. Common keys: lg, ly (0-15 or hex "0".."F"), lc (1-9), lt (1-9), tag. {"type":"line","x1","y1","x2","y2"} {"type":"polyline","points":[[x,y],...],"closed":false} {"type":"rect","x","y","w","h","angle":0} (x,y = lower-left) {"type":"circle","cx","cy","r"} {"type":"arc","cx","cy","r","start","end"} (deg, CCW) {"type":"text","x","y","text","height":3,"width":3,"spacing":0,"angle":0,"align":"left|center|right","font"?,"cn"?} height/width/spacing are paper mm (図寸). x,y = baseline anchor (left-bottom unless align). {"type":"point","x","y"} {"type":"dimension","x1","y1","x2","y2","offset":500,"text"?,"text_height":3,"decimals":0} offset = real-mm distance from the measured points to the dimension line (sign = side). {"type":"solid","points":[[x,y]x3or4],"rgb":[r,g,b]?} Architectural (expand to Jw_cad lines/arcs/text): {"type":"wall","points":[[x,y],...],"thickness":150,"closed":false,"core":true,"core_ly":1,"core_extend":300, "openings":[{"at":1000,"width":800,"kind":"door|double_door|sliding|window|fixed|opening","hinge":"start|end","side":"+|-","frame":25}], "opening_lg":3,"opening_ly":0,"opening_lc":1} at = mm along the centre line; side "+" = left of travel {"type":"grid","xs":[0,3640],"ys":[0,2730],"x_labels":["X1","X2"],"y_labels":["Y1","Y2"],"extend":1500,"dims":false} {"type":"column","cx","cy","w":600,"h":600,"angle":0,"hatch":true} {"type":"room","x","y","name":"和室","height":5,"note":"6帖"} {"type":"pipe","points":[[x,y],...],"system":"給水|給湯|排水|通気|ガス|冷媒|ドレン|ダクト|給気|排気","diameter":"25A"} {"type":"equipment","kind":"toilet|sink|washbasin|bath|kitchen|ac_indoor|ac_outdoor|fan|cubicle|tank|elevator|box","x","y","w","h","angle","label"} A drawing created with a preset fills lg/ly/lc per type automatically (see presets_list).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
defaultsNo
entitiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it states the return value (new ids), that defaults fills lg/ly/lc/lt only for entities that leave them unset, that architectural types expand to Jw_cad lines/arcs/text, and that a preset-created drawing auto-fills layers. It omits error/idempotency behavior and whether 'name' must reference an existing drawing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and return value are front-loaded, followed by a densely packed reference list of entity shapes. It is long, but the length is driven by the genuinely large variant space and every line documents a distinct key or unit, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with an unbounded entity union and no output schema, this is about as complete as it can be: each entity type, its coordinate semantics, unit conventions, and defaults are spelled out, and the return value is stated in prose. Remaining gaps (existence of the target drawing, error handling) are secondary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does for the dominant parameter: the entities array is documented type-by-type with keys, defaults, and units (mm, degrees, CCW). The defaults object is explained; only 'name' is left undefined, though its meaning is obvious from context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource (add entities to a drawing), flags the batch nature, and states the return (new ids). Together with the sibling names (drawing_update, drawing_remove, drawing_new) an agent can immediately place it as the creation/append operation without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: 'batch' hints at adding many entities at once, and it points to presets_list for automatic layer assignment. It never says when to prefer drawing_update or drawing_remove, nor that the target drawing must already exist (drawing_new), so the agent must infer the workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.