Skip to main content
Glama
CDT AutoCAD Provider

CDT AutoCAD Provider

entity_create_line

Creates a linear segment between two WCS endpoints, with optional layer or color, and returns the new backend object identifier.

Instructions

Create a LINE from two WCS endpoints in drawing units, optionally on a layer/color, and return the new backend object identifier.

Side-effects: Mutates active drawing state, advances document fingerprint. Disambiguation: Use entity_create_line for discrete linear segments in WCS; use entity_create_polyline for joined multi-segment paths.

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": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>"
    },
    "name": "entity_create_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1YesStart X coordinate in WCS drawing units
x2YesEnd X coordinate in WCS drawing units
y1YesStart Y coordinate in WCS drawing units
y2YesEnd Y coordinate in WCS drawing units
z1NoStart Z coordinate in WCS drawing units (default: 0.0)
z2NoEnd Z coordinate in WCS drawing units (default: 0.0)
colorNoAutoCAD Color Index (ACI 1-255). Uses ByLayer if omitted
layerNoTarget layer name. Uses active layer if omitted

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.1
    • addedInput schema / properties / color / description
      Added value: +"AutoCAD Color Index (ACI 1-255). Uses ByLayer if omitted"
    • addedInput schema / properties / layer / description
      Added value: +"Target layer name. Uses active layer if omitted"
    • addedInput schema / properties / x1 / description
      Added value: +"Start X coordinate in WCS drawing units"
    • addedInput schema / properties / x2 / description
      Added value: +"End X coordinate in WCS drawing units"
    • addedInput schema / properties / y1 / description
      Added value: +"Start Y coordinate in WCS drawing units"
    • addedInput schema / properties / y2 / description
      Added value: +"End Y coordinate in WCS drawing units"
    • addedInput schema / properties / z1 / description
      Added value: +"Start Z coordinate in WCS drawing units (default: 0.0)"
    • addedInput schema / properties / z2 / description
      Added value: +"End Z coordinate in WCS drawing units (default: 0.0)"
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false; the description goes further by disclosing concrete side-effects (mutates active drawing state, advances document fingerprint) and the return value shape. It stops short of saying whether the call participates in a transaction or is undoable, which matters given transaction_begin/commit siblings.

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

Conciseness5/5

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

Three short lines, front-loaded with the core action, followed by side-effects and disambiguation. Nothing redundant; each sentence carries a distinct fact.

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

Completeness4/5

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

An output schema exists so return values need no explanation, and the description covers creation semantics, side-effects, and sibling routing adequately for an 8-parameter write tool. The only real gap is interaction with the transaction/undo tools, which is not addressed.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter including defaults and ByLayer/active-layer fallbacks is already documented. The description restates 'layer/color' and 'drawing units' without adding syntax or constraints beyond the schema, so baseline 3 applies.

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?

Names a specific verb and resource (create a LINE), pins the coordinate system (WCS endpoints in drawing units), lists optional attributes, and states the return value. It is immediately distinguishable from entity_create_polyline and the other entity_create_* siblings.

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

Usage Guidelines5/5

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

The disambiguation line explicitly routes the agent: linear segments here, joined multi-segment paths to entity_create_polyline. That is an explicit alternative with the condition that selects it, not just implied context.

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