Skip to main content
Glama
SlncTrZ

CDT AutoCAD Provider

xref_attach

Attach or overlay a DWG/DXF external reference into the active AutoCAD drawing with WCS placement, scaling, rotation, and optional layer control.

Instructions

Attach or overlay one allowed DWG/DXF external reference with a bounded WCS transform and optional layer; source paths are canonicalized before AutoCAD side effects.

Side-effects: Attaches external drawing file to active document. Disambiguation: Use to reference external drawings; use block_insert for internal blocks.

Input Schema

NameRequiredDescriptionDefault
xNoInsertion point X in WCS (default: 0.0)
yNoInsertion point Y in WCS (default: 0.0)
zNoInsertion point Z in WCS (default: 0.0)
nameNoBlock name for the XREF. Defaults to filename stem if omitted
pathYesFilesystem path to the external DWG/DXF reference file
layerNoTarget layer name for XREF reference
overlayNoTrue for Overlay reference (not nested), False for Attach reference (default: True)
scale_xNoX scale factor (default: 1.0)
scale_yNoY scale factor (default: 1.0)
scale_zNoZ scale factor (default: 1.0)
rotationNoRotation angle in degrees (default: 0.0)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A3.9/5.0
Behavior3/5

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

With only readOnlyHint=false in annotations, the description earns credit for declaring "Side-effects: Attaches external drawing file to active document" and for noting that source paths are canonicalized before AutoCAD side effects. It still omits what happens on missing/invalid paths, on duplicate block name, and whether an existing xref of the same name is replaced — meaningful gaps for a mutating tool.

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?

Three short, front-loaded blocks (purpose, side-effects, disambiguation) with no filler. The lead sentence is dense with jargon ("bounded WCS transform", "canonicalized before AutoCAD side effects") that costs some immediate readability.

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?

Given an 11-parameter mutation with full schema coverage, an output schema, and a single readOnlyHint=false annotation, the description covers the essentials: it mutates the document, accepts only DWG/DXF, and when to prefer block_insert. Failure behavior and interaction with pre-existing xrefs of the same name remain undocumented.

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 description coverage is 100% across all 11 parameters, so the schema already explains insertion point, scale factors, rotation, overlay flag, name, and layer. The description adds only two cross-parameter constraints not in the schema: only one reference per call, and the DWG/DXF type restriction. 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?

The first sentence states a specific verb (attach/overlay) and resource (DWG/DXF external reference) plus its scope qualifiers (single reference, WCS transform, optional layer, path canonicalization). The disambiguation line explicitly separates it from block_insert, so an agent can distinguish it from the nearest sibling without opening either schema.

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?

It gives an explicit use case ("use to reference external drawings") and an explicit alternative with the condition that selects it (block_insert for internal blocks). It does not address the other xref-family siblings — xref_reload, xref_unload, xref_detach, xref_list — or state prerequisites such as the file needing to exist on disk.

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