Skip to main content
Glama

Dessiner un lot de primitives

draw

Trace lines, polylines, circles, arcs, text, and hatches in one AutoCAD batch transaction, returning handles and failures for single-step undo.

Instructions

Trace une LISTE de primitives géométriques en un seul lot: segments, polylignes, rectangles, cercles, arcs, textes, paragraphes et hachures.

À utiliser dès qu'il y a plus d'une entité à tracer, ce qui est le cas presque toujours. Le lot forme une transaction unique: une seule marque d'annulation, un seul rafraîchissement d'affichage. Enchaîner des appels unitaires est plus lent et rend l'annulation impraticable.

Pour des éléments de bâtiment (murs, portes, fenêtres, pièces), utilisez build_structure: il pose les calques normalisés et la géométrie attendue d'un plan.

Les angles sont en DEGRÉS. Les longueurs sont dans l'unité du document, que get_drawing_info donne.

La réponse porte les DEUX côtés: les handles réellement créés, et les échecs éventuels avec l'index de l'élément fautif dans la liste fournie. Un lot partiellement exécuté n'est jamais annoncé comme un succès. Vérifiez ensuite avec render_view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoNom du lot, qui devient le libellé de la marque d'annulation. Un plan entier annulé redevient un seul geste. Exemple: "rez-de-chaussee".draw
operationsYesOpérations à exécuter, dans l'ordre. Chaque élément est distingué par son champ "op".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial context beyond annotations: batch forms a single transaction with one undo mark and one refresh; partial execution is never reported as success; the response carries both created handles and failures with the faulting index; suggests verifying with render_view. Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false), so this supplementary behavior description is strong, though it doesn't detail auth/permissions.

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?

Well front-loaded: verb+scope first, then when-to-use, then sibling routing, then unit conventions, then response shape. Every paragraph earns its place with no filler.

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?

Complete for a batch-mutation tool: covers scope, transaction/undo behavior, partial-failure reporting, and unit conventions. No output schema exists, and the description compensates by describing the return (handles + failures with index). Minor gap: does not state permission/auth requirements.

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%, so the schema already documents both parameters (label and the rich per-op item schemas). The description adds angle-unit (degrees) and length-unit context, but the baseline of 3 is correct when the schema carries the parameter burden.

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 (trace/draw) and resource (batch of geometric primitives: segments, polylines, rectangles, circles, arcs, texts, paragraphs, hatches). Explicitly distinguishes from the sibling build_structure by naming it and defining the boundary ('Pour des éléments de bâtiment... utilisez build_structure').

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?

Gives an explicit when-to-use rule: 'À utiliser dès qu'il y a plus d'une entité à tracer', with rationale (single undo mark, single refresh, chained calls slower). Also names the alternative build_structure and the condition that selects it (building elements).

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