Skip to main content
Glama

run_tcl

Destructive

Executes a Tcl script inside OrCAD Capture's interpreter to access its database API and commands, returning the result. Use it for schematic tasks no dedicated tool covers.

Instructions

Run a Tcl script in Capture's interpreter (Tcl 8.4: no {*}, dict, lassign, lmap, min()/max() in expr) and return its result.

Gives full access to Capture's database API (DboSession, DboDesign, Dbo* classes; see Cadence's OrCAD_Capture_TclTk_Extensions.pdf) and Capture commands (Menu, PlaceWire, ...). Use only when no dedicated tool fits, and tell the user what the script changes. Disabled when ORCAD_MCP_ALLOW_TCL=0.

Refused when the script uses an undocumented Capture GUI command known to crash Capture (GetWindows, GetActiveWindow, GetActivePage, ...) unless allow_unsafe=true. Never call a method on a Dbo result without checking it for NULL (e.g. the net of an unconnected pin).

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": {
      "script": "<script>"
    },
    "name": "run_tcl"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYes
timeout_sNo
allow_unsafeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint=false, destructiveHint=true), which only flag mutation risk. The description discloses the interpreter version and its missing language features, the crash-prone GUI commands that are refused by default, the environment-variable kill switch, and the NULL-check hazard on Dbo results — concrete failure modes an agent cannot infer elsewhere.

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 core action, then layers caveats in descending importance; no filler sentences. The parenthesized feature and command lists are dense but each item is a real pitfall, so the length is largely earned.

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 high-blast-radius mutation tool with no annotations detail or output schema, it covers safety gating, environment prerequisites, refusal rules, and known code hazards. The main omissions are the meaning of 'result' and timeout semantics, which an agent would need to call it reliably.

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?

With 0% schema description coverage the description must carry the load, and it does clarify 'script' (Tcl 8.4 dialect, with API/command access) and 'allow_unsafe' (permits otherwise-refused GUI commands). 'timeout_s' is never mentioned — no units, default behavior, or consequence on expiry — leaving one of three parameters undocumented.

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 — run a Tcl script in Capture's interpreter and return its result — and immediately scopes it against the sibling catalog with 'use only when no dedicated tool fits'. An agent can tell this apart from place_wire, list_nets, etc. 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 Guidelines5/5

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

Explicit when-to-use (only when no dedicated tool fits), an operational precondition (disabled when ORCAD_MCP_ALLOW_TCL=0), a user-facing obligation ('tell the user what the script changes'), and a refusal condition with its escape hatch (allow_unsafe=true). It names both the alternative strategy and the exclusions.

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