Skip to main content
Glama

Supprimer des entités

delete_entities
Destructive

Permanently deletes AutoCAD drawing entities matching a layer, type, color, handle list, or rectangular window filter, returning handles; use to remove misdrawn geometry or clear a layer.

Instructions

DESTRUCTIF ET IRRÉVERSIBLE. Supprime toutes les entités correspondant au filtre et renvoie leurs handles. undo_last_batch ne restaure PAS ce que cet outil efface: il n'annule que des créations.

À utiliser pour retirer ce qui a été mal tracé quand undo_last_batch ne suffit plus, parce que d'autres lots sont venus par-dessus, ou pour nettoyer un calque entier.

Le filtre est unifié et ses critères se combinent par ET logique: calque, type, couleur, liste de handles, fenêtre rectangulaire. Pour supprimer précisément, passez d'abord par query_entities et supprimez par handles.

Un filtre VIDE désigne le dessin entier. Dans ce cas seulement, confirm_delete_all doit valoir true, sinon l'appel est refusé avec le code confirmation_required. Ne posez ce drapeau que si l'utilisateur a demandé d'effacer tout le dessin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType DXF de l'entité, tel que renvoyé par query_entities dans le champ "type". Exemple: "LWPOLYLINE".
colorNoCouleur: nom (blue, byblock, bylayer, cyan, gray, green, light_gray, magenta, red, white, yellow, ou les synonymes français rouge, vert, bleu, jaune, gris, blanc) ou index ACI entier de 0 à 256. Omise, l'entité suit son calque (ByLayer). Exemple: "red" ou 1. Attention: l'index 0 est ByBlock, pas noir; le noir du dessin technique est l'ACI 7, nommé "white".
layerNoNom exact du calque, comparaison par nom entier et non par sous-chaîne. Exemple: "WALLS".
windowNoFenêtre rectangulaire [xmin, ymin, xmax, ymax] dans l'unité du document. Ne retient que les entités entièrement contenues. Exemple: [0, 0, 10, 8].
handlesNoHandles d'entités. Un handle s'obtient d'abord par query_entities ou dans la réponse de draw / build_structure; il n'est jamais deviné. Exemple: ["1F3", "1F4"].
confirm_delete_allNoObligatoire, et à true, pour effacer TOUT le dessin, c'est-à-dire quand aucun autre critère n'est fourni. Sans effet si un critère est donné. Suppression irréversible.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds much beyond them: irreversibility, the fact that undo_last_batch will NOT restore these deletions, that handles are returned, and that an empty filter triggers a confirmation_required refusal unless the flag is set. This is exactly the behavioral context an agent needs before an irreversible call.

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?

Front-loads the destructive/irreversible warning, then usage, then filter semantics, then the critical empty-filter confirmation rule. Length is justified given the irreversibility and the unusual empty-filter edge case; nothing reads as filler.

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?

For a destructive 6-parameter tool with no output schema, the description covers everything needed to call it safely: what is destroyed, that it is unrecoverable, what gets returned, how filters combine, and the exact guard condition for wiping the drawing.

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 meaning the schema does not: filter criteria combine with logical AND, an empty filter means the entire drawing, and confirm_delete_all is only effective/required in that empty-filter case. It stops short of restating format details that the schema already carries.

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 precise verb+resource (deletes all entities matching a filter, returns their handles) and distinguishes itself explicitly from undo_last_batch, clarifying that it cancels creations only there and not here. An agent can tell it apart from siblings like query_entities or undo_last_batch without opening any schema.

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 explicit when-to-use (remove mis-drawn geometry when undo_last_batch is insufficient or too many batches have accumulated, or clean a whole layer) and names the safer alternative workflow: use query_entities first, then delete by handles. It also states the exclusive condition for confirm_delete_all.

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