Skip to main content
Glama
open-mcp-cad

open-mcp-cad

execute_cadwork_batch

Runs the same cwapi3d code in packages over a JSON data list, creating many similar Cadwork parts in batches with progress tracking and undo per package.

Instructions

Führt denselben cwapi3d-Code paketweise über eine Datenliste aus.

Für grosse Mengen gleichartiger Bauteile: die Daten (ein Eintrag je Bauteil, z. B. Punkte, Masse, Namen) liegen als JSON-LISTE in daten_datei (absoluter Pfad, .json). Der Code wird EINMAL geschrieben; der Server schickt ihn je Paket mit anderen Daten an Cadwork. Im Code stehen bereit: paket die Einträge dieses Pakets (Liste) paket_nr 1, 2, ... pakete Anzahl Pakete paket_start Index des ersten Eintrags in der ganzen Liste result jedes Pakets kommt in ergebnisse zurück (Liste, ein Wert je Paket) — klein halten, z. B. nur die neuen IDs oder Zähler.

Jedes Paket ist ein eigener Auftrag und ein Undo-Schritt. Zwischen den Paketen bleibt Cadwork bedienbar, der Fortschrittsbalken im Dock zeigt den Stand. Im Zeichenmodus «Auto» erscheint jedes Paket im Bild, sobald es fertig ist; nachgezogen in der Antwort nennt, was das Nachziehen der Darstellung dafür gekostet hat. Paketgrösse so wählen, dass ein Paket einige Sekunden braucht. Alle Pakete werden vor dem ersten Senden gebaut und gegen die Code-Grenze geprüft.

Beim ersten Fehler hört der Lauf auf. Die Antwort nennt pakete_fertig, abgebrochen_bei_paket und ob das abgebrochene Paket gelaufen sein kann (antwort_fehlt: dann NICHT wiederholen, erst get_connection_status()). Einen Rest-Lauf mit einer neuen Datei ab eintraege_fertig starten.

Args: code: cwapi3d-Python-Code, der paket verarbeitet. daten_datei: absoluter Pfad einer .json-Datei mit einer Liste. paket_groesse: Einträge je Paket (ab 1). description: Klartext für Dock und Log, bekommt "(Paket k/n)". timeout_s: Wartezeit auf die Antwort EINES Pakets (0 = 120 s).

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": {
      "code": "<code>",
      "daten_datei": "<daten_datei>"
    },
    "name": "execute_cadwork_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
timeout_sNo
daten_dateiYes
descriptionNo
paket_groesseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.3

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: each packet is its own undo step, Cadwork stays usable between packets, the dock shows a progress bar, draw mode 'Auto' redraws per packet and nachgezogen reports that cost, all packets are built and validated against the code limit before the first send. It also discloses failure behavior — halt on first error, abgebrochen_bei_paket, and the critical antwort_fehlt warning not to retry before get_connection_status().

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?

Long but well structured: purpose first, then data/code contract, then runtime behavior, then a conventional Args block. Density is high and most sentences carry non-obvious information, though the packet-size and redraw passages could be tightened without losing meaning.

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?

For a no-annotation, no-output-schema, five-parameter batch executor, this is complete: it explains the data format, the in-code variable contract, packet sizing, failure semantics, and the shape and meaning of the response keys including nachgezogen and antwort_fehlt. An agent could call it and write correct code from this description alone.

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 compensate, and it largely does: daten_datei is an absolute .json path holding a list, paket_groesse is entries per packet (min 1), timeout_s is the wait per single packet with 0 meaning 120 s, and description is dock/log text suffixed with '(Paket k/n)'. It also documents the injected code context (paket, paket_nr, pakete, paket_start, result/ergebnisse), which is essential to writing the code argument; only the 'code' parameter itself gets a bare one-line gloss.

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 mechanism: it executes the same cwapi3d code packet-by-packet over a JSON data list, and the opening line 'Für grosse Mengen gleichartiger Bauteile' scopes it to bulk/parameter-sweep work. That distinguishes it in practice from the single-shot execute_cadwork_command sibling without needing to name it.

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 a clear use condition (many similar components, data stored as a JSON list) plus operational guidance: choose paket_groesse so each packet takes a few seconds, and restart a partial run with a new file from eintraege_fertig. It never names an explicit alternative or a when-not-to-use case, so it stops short of a 5.

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