Skip to main content
Glama

Changer la couleur d'entités

set_entity_color

Change the color of AutoCAD entities by handle to fix objects that sit on the correct layer but display the wrong color, without erasing or redrawing them. Supports ByLayer and ACI color values.

Instructions

Change la couleur d'une ou plusieurs entités désignées par leur handle.

À utiliser pour corriger une entité posée sur le bon calque mais dans la mauvaise couleur, sans avoir à l'effacer puis à la redessiner.

Les handles s'obtiennent d'abord par query_entities, ou dans la réponse de draw et build_structure: ils ne se devinent pas.

Pour rendre une entité à la couleur de son calque, passez "bylayer", ce qui est la convention du dessin technique. L'index 0 est ByBlock et non noir; le noir est l'ACI 7, nommé "white".

Chaque handle est traité séparément: la réponse indique lesquels ont été modifiés et lesquels ont échoué, avec la raison.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesCouleur: 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".
handlesYesHandles des entités à recolorer, obtenus par query_entities ou par un lot d'écriture. Exemple: ["1F3", "1F4"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false. The description goes beyond them by disclosing per-handle partial-failure semantics ('la réponse indique lesquels ont été modifiés et lesquels ont échoué, avec la raison') and the 'bylayer' convention. It does not discuss permissions or reversibility, so not a 5.

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 purpose, then handle sourcing, then color conventions, then response behavior. Efficient, though the ByBlock/ACI 7 caveat is duplicated from the schema, which costs a little.

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, so the description appropriately explains the return behavior (which handles succeeded/failed and why). Handle provenance, color conventions, and partial-failure handling are all covered. Minor gaps like handle-count limits are only in the schema, but that is acceptable.

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% and both parameters carry detailed descriptions, so the schema does the heavy lifting. The description's color guidance ('bylayer', index 0 = ByBlock, ACI 7 = 'white') largely repeats what the schema already states, adding little beyond it. Baseline 3 is correct.

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 ('Change la couleur d'une ou plusieurs entités') and scopes it precisely to entities designated by handle. It also names related siblings (query_entities, draw, build_structure) as the source of handles, so the agent can distinguish it from them without opening schemas.

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?

Explicitly states when to use it ('corriger une entité posée sur le bon calque mais dans la mauvaise couleur, sans avoir à l'effacer puis à la redessiner') and where the required handles come from, plus the clause that handles cannot be guessed. Nothing about selection is left to inference.

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