Skip to main content
Glama

dxf_dimensions

Append linear, aligned, radius, diameter, and angular dimensions to DXF drawings, automatically creating missing files and returning measured values.

Instructions

向 DXF 图纸追加尺寸标注;文件不存在时自动创建。

每个标注是一个 dict,公共可选字段:layer、color、dimstyle(默认 "Standard")、 text(自定义标注文字,不传则显示实测值)。

标注类型与必填字段(坐标单位与绘图一致): linear: p1, p2, location[标注线位置点, 可选], angle(0=水平标注, 90=垂直) aligned: p1, p2, location[标注线位置点, 可选] radius: center, radius, angle(引线方向, 度, 可选), location(可选) diameter: center, radius, angle(可选), location(可选) angular: center, p1, p2[两条射线的端点], location(标注弧位置点, 可选, 不传则画在角平分线上)

返回值含每个标注的实测测量值(measurement),可直接核对。 注意:标注的预览渲染是 ezdxf 的简化实现,与 AutoCAD 的显示可能有差异 (例如 angular 预览可能显示补角);打开 AutoCAD 后 CAD 会按定义点 重新渲染,以 CAD 显示为准。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dimsYes
pathYes
dxfversionNoR2010

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/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 load and does well: it discloses file auto-creation, that the return value includes per-dimension measurement values for verification, and a substantive caveat that ezdxf preview rendering differs from AutoCAD (e.g. angular may show the supplementary angle, and CAD re-renders on open). It stops short of stating permissions or failure modes, but the behavioral disclosure is well above baseline.

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?

Content is front-loaded with the core purpose, then a well-structured field/type listing, then the return-value and rendering notes. The per-type enumeration is dense but each line earns its place; nothing is padded.

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?

No output schema exists, yet the description compensates by explaining that the return contains per-dimension measurement values, and it flags the rendering-fidelity caveat. Combined with the thorough dims documentation, an agent has enough to invoke this correctly, though error/auth behavior remains unstated.

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% and the nested `dims` array is untyped in the schema, yet the description compensates heavily by documenting common optional fields (layer, color, dimstyle default "Standard", text) and the required fields per dimension type (linear/aligned/radius/diameter/angular). Only `path` and `dxfversion` go undescribed, which are largely self-evident.

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 ("向 DXF 图纸追加尺寸标注") and immediately notes the auto-create behavior. The dimension-oriented framing distinguishes it cleanly from sibling tools like dxf_draw, dxf_hatch, and dxf_splines without needing to name them.

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?

The description enumerates the five supported dimension types and their required fields, which implicitly tells the agent when each is applicable, and notes auto-creation when the file is missing. However it never explicitly contrasts this tool with dxf_draw or states when-not to use it, so guidance is implied rather than explicit.

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