Skip to main content
Glama

swdraw_run_script

Run custom Python scripts from SWDRAW_SCRIPTS_DIR with swdraw importable, pass arguments, and return structured results for SolidWorks drawing automation.

Instructions

Run one of your own Python scripts from SWDRAW_SCRIPTS_DIR with swdraw importable (import swdraw as sw; sw.args(); sw.result({...})).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
scriptYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose two genuinely useful facts beyond the schema: scripts must live in SWDRAW_SCRIPTS_DIR and the in-script contract is `import swdraw as sw; sw.args(); sw.result({...})`. However, it omits that this executes arbitrary code, what happens on script error/timeout, and whether the script can mutate drawing state — material for an execution tool.

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?

A single sentence with the operative constraint (SWDRAW_SCRIPTS_DIR) up front and an inline code example that conveys the API contract in fewer tokens than prose would. Nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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-value explanation is unnecessary, and the core invocation contract is covered. For an arbitrary-code-execution tool with zero annotations, though, the definition leaves out failure behavior and side-effect scope, which an agent needs before invoking it.

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 0%, so the description must compensate. It clarifies that `script` names a file under SWDRAW_SCRIPTS_DIR and the `sw.args()` snippet implies that the `args` object is what the script reads, but it never states the format, defaults, or how args maps onto the script's inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Run) and a clearly bounded resource (your own Python scripts located in SWDRAW_SCRIPTS_DIR), which an agent can immediately distinguish from siblings like swdraw_build_drawing or swdraw_validate_spec that operate on specs rather than user code. It stops short of explicitly naming an alternative or exclusion, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description says what can be run but never says when to reach for this tool instead of the ten purpose-built siblings. There is no guidance on prerequisites, when scripting is preferable to a declarative tool, or when it should be avoided — the agent must infer the escape-hatch role entirely.

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