Skip to main content
Glama
U-C4N
by U-C4N

Sheet: Attach Xref

xref_attach

Attach an external reference to a drawing and insert it once, avoiding duplicate blocks. Set path, insertion point, scale, rotation, and attach or overlay type.

Instructions

Attach an external reference and insert it once. Both engines.

The block takes the referenced file's stem as its name. Refusals, all before anything is written: a kind that is not 'attach' or 'overlay', a file that does not exist, a non-positive or non-finite scale, and a block name the drawing already holds — detach it first with xref_manage(action='detach').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoInsertion X (WCS).
yNoInsertion Y (WCS).
kindNo'attach' (the reference's own xrefs come with it) or 'overlay' (they do not, so a circular reference cannot form).attach
pathYesFull path of the drawing to reference.
scaleNoUniform scale.
rotationNoRotation in degrees, CCW from +X.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare destructiveHint=false; the description adds real behavioral content: the block name is derived from the referenced file's stem, and all validation refusals happen before anything is written. That atomicity guarantee is exactly the kind of context annotations don't carry.

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-loaded with the core action, then the naming rule, then refusals. Every sentence carries information, though 'Both engines' is terse to the point of being cryptic and the refusal list is dense.

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?

An output schema exists, so return values need not be described. For a 6-parameter mutation tool the description covers naming, validation, and recovery, leaving no material gap for an agent to call it correctly.

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 100%, so the baseline is 3, but the description adds non-obvious semantics: the `path` value's stem becomes the block name, and `scale` must be positive and finite. It stops short of explaining x/y/rotation beyond what the schema already says.

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 (attach) and resource (external reference) plus a scope detail ('insert it once') and engine coverage ('Both engines'). It is clearly distinguishable from xref_manage, image_attach, and block_insert.

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 explicit failure conditions (bad kind, missing file, non-positive scale, duplicate block name) and names the recovery path: detach first with xref_manage(action='detach'). It does not, however, contrast itself with sibling inserters like image_attach or block_insert.

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

Deploy Server

Other Tools