Skip to main content
Glama

edit_drawing

Edit CAD drawing entities, layers, and text locally while preserving the original file; each change creates a new working-copy version with atomic operations and undo/reset support.

Instructions

Edit a drawing locally (no calls, except 1 the first time to fetch the drawing as IR). Every edit is saved as a new version of the working copy; the original file is never changed. Returns the counts changed, the IDs and real lengths of added entities, and the version.

ops: a list of operations, applied all or nothing: {"op": "set", "ids": [...] or "where": {"layer"|"kind"|"text": ...}, "fields": {...}} fields: layer, color (0-256 or "#RRGGBB"), linetype, lineweight_mm, or the kind's geometry and text fields (p1, p2, center, radius, insert, height, text...). {"op": "delete", "ids": [...]} or with "where" {"op": "replace_text", "pattern": "old", "replacement": "new", "where": {...}?, "regex": false} {"op": "add_layer", "name": "walls", "color": 5} {"op": "add", "entities": [{"kind": "LINE", "layer": "walls", "p1": [0, 0], "p2": [36.4, 0]}]} kinds: LINE, CIRCLE, ARC, POINT, LWPOLYLINE, TEXT, MTEXT. Coordinates are drawing units (see inspect_drawing; for Jw_cad, millimetres on paper). To pick by area, get IDs with query_drawing first. No geometric operations (move, copy, offset): compute new coordinates and use set or add. create: start a blank drawing at path (which must not exist): {"format": "jww" or "dxf", "paper": "A3", "scale": "1/100", "layers": ["walls", "text"]} undo: go back one version. reset: discard the working copy (start again from the file).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "edit_drawing"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsNo
pathYes
undoNo
resetNo
createNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full load, and it does well: the original file is never modified, every edit becomes a new version, ops apply all-or-nothing, and create requires a non-existent path. It also states the return payload (counts, added IDs, real lengths, version). Missing are error behavior on bad IDs, permission/auth needs, and any size limits, so it is strong but not exhaustive.

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?

Front-loads the behavioral contract (local, versioned, original untouched, return shape) before the dense ops reference, so an agent gets the essentials first. The op block is necessarily long given the empty schema, but some repetition (e.g. restating kinds and coordinate notes) could be tightened.

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 five-parameter mutation tool with no annotations, no output schema, and 0% schema description coverage, the description supplies the operation grammar, creation semantics, versioning/undo model, and return values. An agent has enough to construct a valid call without opening anything else.

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 define all five parameters, and it effectively does: ops is broken down op-by-op with field names, value ranges (color 0-256 or #RRGGBB), and accepted kinds; undo and reset are explained; create's format/paper/scale/layers keys are enumerated. Only path lacks an explicit sentence, and its role is inferable 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?

States a specific verb and resource (edit a drawing) plus the crucial scope detail that it runs locally with a single IR fetch, which distinguishes it from render_drawing and convert_drawing. The op taxonomy and the explicit 'no geometric operations' note make the tool's remit unmistakable.

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

Usage Guidelines4/5

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

Gives concrete routing guidance: use query_drawing first to obtain IDs when selecting by area, and consult inspect_drawing for coordinate units. It also names what the tool will not do (move/copy/offset) and points to set/add instead. It stops short of an explicit when-not-to-use-this-tool-vs-siblings statement, but the alternatives named cover the practical cases.

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