Skip to main content
Glama
C48H74

AutoCAD MCP Server

by C48H74

run_lisp

Destructive

Execute one AutoLISP expression in AutoCAD via SendCommand for specialized commands no other tool covers, like Plant 3D tasks.

Instructions

Executa UMA expressão AutoLISP no AutoCAD via SendCommand. Desligado por padrão (enable_lisp no config.toml).

QUANDO USAR: só quando nenhuma outra ferramenta faz o serviço (ex.: comando específico do Plant 3D). LIMITAÇÕES REAIS: SendCommand é ASSÍNCRONO e NÃO devolve o resultado do LISP — para ler um valor, faça o LISP gravá-lo em uma variável de sistema (SETVAR "USERS1" ...) e leia com outra ferramenta/no AutoCAD; não entra no agrupamento de undo do servidor (o AutoCAD cria o próprio passo). Exige confirm=true; expressão em uma linha, ≤ 2000 caracteres, parênteses balanceados; funções de arquivo/registro/processo são bloqueadas (defesa parcial, não é sandbox). Toda execução é registrada no log. Parâmetros: expression, confirm, wait_seconds (espera até 30 s o AutoCAD ficar ocioso). Exemplo: run_lisp('(setvar "USERS1" (rtos (getvar "DIMSCALE")))', confirm=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNo
expressionYes
wait_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

Far beyond the annotations: it discloses that SendCommand is asynchronous and returns nothing, prescribes the SETVAR USERS1 workaround for reading values, notes it is excluded from the server's undo grouping, lists expression constraints (single line, ≤2000 chars, balanced parens), warns that file/registry/process functions are blocked as only a partial defense rather than a sandbox, and states every execution is logged. For a destructive=true tool this is exactly the context an agent needs before calling it.

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 one-line what, then headed blocks for when-to-use and limitations, which makes it skimmable despite high density. It is long, but for a destructive, non-sandboxed eval tool nearly every clause earns its place; only the parameter list is compressed into an unhelpful run-on.

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?

An output schema exists, and the description still preempts the key surprise by saying SendCommand does not return the LISP result. Combined with the safety caveats, the logging note, and the workaround for reading values, an agent has everything required to call this tool safely and interpret its behavior.

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 0%, so the description must carry the load, and it does explain all three parameters (expression, confirm, wait_seconds with its ≤30s idle-wait meaning) plus the confirm=true requirement. The treatment of individual params is terse (a bare comma list) relative to the detailed expression constraints, so it falls just short of fully compensating.

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 ("Executa UMA expressão AutoLISP no AutoCAD via SendCommand") and explicitly positions itself against the rest of the toolset ("só quando nenhuma outra ferramenta faz o serviço"). An agent can immediately tell this is the general-purpose escape hatch rather than one of the many dxf_*/draw_* siblings.

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?

The QUANDO USAR block gives an explicit selection rule (use only when no other tool covers the case) plus a concrete example (Plant 3D-specific command). It also states the hard precondition confirm=true, so the agent knows not just when but under what gate to invoke it.

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