Skip to main content
Glama

query_drawing

Read-only

Search CAD drawing entities by layer, kind, text, bounding box, or IDs, returning matching items, lengths, counts, and totals with pagination for targeted review and editing.

Instructions

List entities matching all given conditions, with IDs, layers, kinds, texts and lengths, plus totals (count, length and area, also in real mm). Uses 1 call.

layer / kind: one name or a list (kinds: LINE, ARC, CIRCLE, LWPOLYLINE, TEXT, MTEXT, INSERT, DIMENSION, HATCH...). text: a substring of the entity text (text_regex=true for a regular expression). bbox: [xmin, ymin, xmax, ymax] in drawing coordinates; bbox_mode "intersects" (default) or "within". ids: entity IDs. include_entities: also return each entity in IR form (use it as a model for edit_drawing's add). limit: 1-500 (default 50); pass next_cursor back as cursor for the next page. Narrow by layer or bbox first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "query_drawing"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo
bboxNo
kindNo
pathYes
textNo
layerNo
limitNo
cursorNo
bbox_modeNo
use_editsNo
text_regexNo
include_entitiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=true, and the description adds genuinely new behavior: the 1-500 limit with default 50, cursor-based paging, that totals are also reported in real mm, and the optional IR payload. It does not explain cost/performance characteristics of bbox vs id filtering or the effect of use_edits, which keeps it off 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-loads the outcome sentence, then switches to a labeled param-by-param list, which is efficient for 12 parameters and avoids prose padding. The line wrapping and trailing blank line are minor cosmetic noise, and the parenthetical asides ("also in real mm", "...") slightly dilute the scan.

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?

For a 12-parameter read tool with no output schema, the description covers return contents, paging, and most filters, which is close to what an agent needs. The two omissions — the required path parameter and what use_edits=true means — are the only things that could force a guess on invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description carries the full burden and mostly delivers: it enumerates accepted kinds (LINE, ARC, CIRCLE, LWPOLYLINE, TEXT, MTEXT, INSERT, DIMENSION, HATCH), the bbox coordinate order [xmin, ymin, xmax, ymax], bbox_mode values and default, text substring vs text_regex, limit range/default, and cursor semantics. Only path and use_edits are left unexplained, which is a small residual gap against an otherwise thorough pass.

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?

Opens with a specific verb+resource ("List entities matching all given conditions") and immediately states what comes back (IDs, layers, kinds, texts, lengths, plus count/length/area totals). That is clearly a read/query operation and is distinguishable from edit_drawing, convert_drawing, inspect_drawing and render_drawing 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real routing advice: "Narrow by layer or bbox first", a pagination loop (pass next_cursor back as cursor), and a cross-tool pointer that include_entities output "use it as a model for edit_drawing's add". It stops short of stating when NOT to use it or naming a concrete alternative query tool, so it lands just below the top band.

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