Skip to main content
Glama

Inspecter les entités

query_entities
Read-onlyIdempotent

Lists drawing entities that meet filter criteria, returning handles, types, layers, colors, and bounding boxes. Use it to find objects before modifying or deleting them.

Instructions

Liste les entités du dessin qui satisfont un filtre, avec leur handle, leur type, leur calque, leur couleur et leur boîte englobante.

À utiliser pour retrouver ce qui existe déjà avant de modifier ou de supprimer: les handles renvoyés ici sont le préalable obligatoire à set_entity_color et à une suppression par handles.

La réponse est TOUJOURS bornée. Elle donne le compte total des entités correspondantes ET un échantillon limité, avec un drapeau indiquant si elle a été tronquée. Un dessin de cinquante mille entités ne sera jamais déversé: affinez le filtre plutôt que d'augmenter la limite.

Pour voir le dessin plutôt que de l'énumérer, utilisez render_view.

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".
limitNoNombre maximal d'entités décrites. Défaut 200, plafond dur 1000. Le compte total est rendu quoi qu'il arrive.
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"].

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?

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered structurally. The description still adds real behavioral context beyond that: the response is ALWAYS bounded, always returns a total count plus a truncated sample with a flag, and the guidance to refine the filter instead of raising the limit. It does not discuss permissions or error behavior, but for a local read-only query that is a minor omission.

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?

Four short paragraphs, front-loaded with what is returned and followed by usage, bounding behavior, and the sibling pointer. Each section earns its place, though the description is on the longer side for a single query tool and the bounding point is restated across two sentences.

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?

There is no output schema, so the description carries the burden of describing the return shape, and it does: handles, type, layer, color, bounding box, plus total count, truncated sample and a truncation flag. Combined with the usage and sibling guidance, an agent has everything needed to call and interpret this tool.

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 every parameter is already documented in the schema, including the ACI color nuance and handle sourcing. The description adds only indirect guidance ('affinez le filtre'), not syntax or format detail beyond the schema, so the baseline 3 applies.

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 ('Liste les entités du dessin qui satisfont un filtre') and enumerates the returned fields (handle, type, calque, couleur, boîte englobante), so the agent knows exactly what this produces. It also explicitly distinguishes itself from render_view, which serves a different need.

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 ('retrouver ce qui existe déjà avant de modifier ou de supprimer') and states that the returned handles are a mandatory prerequisite for set_entity_color and handle-based deletion, naming those siblings. It also names the alternative for a different intent (render_view) with the condition that selects it.

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