Skip to main content
Glama
C48H74

AutoCAD MCP Server

by C48H74

dxf_sql_query

Read-only

Query DXF drawings with SQL SELECT against in-memory entities and attributes to aggregate counts by layer, find blocks without TAG, and sum lengths.

Instructions

Consulta o DXF com SQL SELECT sobre um índice em memória (tabelas entities e attributes).

QUANDO USAR: perguntas agregadas (contagens por camada, blocos sem TAG, comprimento total por camada). Parâmetros: path; sql (somente SELECT; colunas entities: handle,type,layer,color,block,x,y,z,text,length,radius; attributes: handle,block,tag,value); limit (máx. 1000). Exemplo: dxf_sql_query(path="a.dxf", sql="SELECT layer, COUNT(*) n, SUM(length) L FROM entities GROUP BY layer")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
pathYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds useful constraints: SQL is SELECT-only and limit is capped at 1000, plus it is an in-memory index over entities/attributes. It does not cover error behavior or auth, but adds meaningful behavioral context beyond annotations.

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 core purpose, then uses clear sections for usage, parameters, and an example. Every sentence earns its place, and the example directly illustrates a valid aggregated query. No wasted text.

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?

An output schema exists, so return values need not be explained. The description covers when to use it, all parameters, allowed SQL columns, and a concrete example. Minor gaps like default limit behavior or path validation are not critical for correct invocation.

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 description coverage is 0%, so the description must carry parameter meaning. It lists all three parameters and explains the sql parameter's allowed columns for entities and attributes, plus the limit maximum. Path is not elaborated, but it is self-evident; this compensates well for the schema gap.

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+resource: 'Consulta o DXF com SQL SELECT sobre um índice em memória (tabelas entities e attributes)'. This distinguishes it from generic siblings like dxf_query or query_entities by specifying SQL SELECT and the exact tables. An agent can tell what the tool does without opening the 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?

Includes an explicit 'QUANDO USAR' section for aggregated questions (counts by layer, blocks without TAG, total length by layer) with examples. It does not name alternatives or when not to use it, but the positive context is clear enough to route correctly.

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