Skip to main content
Glama
drive-it
by jedbjorn

execute_script

Run inline Python or a saved script revision in an isolated worker to perform Revit model edits, returning a durable receipt for every run.

Instructions

Run inline Python or an exact saved script revision in the isolated fixed worker. File and typed Revit effects follow the persistent workspace policy and return a durable receipt.

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": {
      "displayName": "<displayName>"
    },
    "name": "execute_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptNoSaved script reference; mutually exclusive with source. An exact draft or active revision, or "latest" for the newest active revision. Retired revisions are rejected
sourceNoInline Python source; mutually exclusive with script
documentNoOptional model path and broker-issued document handle
argumentsNoJSON arguments exposed to Python as args; saved scripts validate them against the revision's inputSchema and apply its defaults
processIdNoWindows process ID of the selected Revit.exe; omit it to use the only running Revit
timeoutMsNoWorker timeout, default 30000 ms
displayNameYesRequired. One plain-language line, written for the user, saying what this run does to their files or model, e.g. "Add Level 3 at 24 ft to the tower model". Shown in the Drive-It operator window's run history and approval requests
idempotencyKeyNoReplay key; completed runs return their original receipt. To resume a run that returned status pending, call again with the same idempotencyKey and the same request; a new key starts a new request that needs a new approval

Output Schema

NameRequiredDescriptionDefault
logsYes
errorYes
runIdYes
checksYes
resultYes
statusYes
changesYes
sessionYes
codeHashYes
documentYes
argumentsYes
startedAtYes
completedAtYes
displayNameYes
fingerprintYes
savedScriptYes
affectedFilesYes
workspaceRootYes
idempotencyKeyYes
policyRequestsYes
affectedElementsYes
policyDecisionIdsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses the isolated fixed worker (sandboxing), that file and typed Revit effects are governed by the persistent workspace policy, and that runs return a durable receipt. It omits that runs may land in a pending approval state, though that detail is partially recoverable from the idempotencyKey schema description.

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?

Two sentences, front-loaded with the action and modes, then the safety/effects contract. Dense but each clause carries information; minor jargon ('isolated fixed worker', 'typed Revit effects') costs a little legibility.

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 mutation-capable, 8-parameter tool with nested objects and no annotations, the description covers the essential safety story, and the output schema and rich parameter descriptions absorb the rest (return values, timeouts, process selection, replay). The main residual gap is the approval/pending workflow, which an agent must infer from the schema rather than the description.

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 100% across all 8 parameters and nested objects, so the baseline is 3. The description adds only the high-level source/script dichotomy already spelled out in the schema's mutual-exclusivity notes, contributing no further syntax, formatting, or default detail.

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?

The description opens with a specific verb ('Run') and two concrete resource modes ('inline Python or an exact saved script revision'), which is far better than the bare name. It does not explicitly contrast with siblings such as save_script or get_script, but the execution framing is unmistakable.

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

Usage Guidelines3/5

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

Usage is only implied: the two supported modes (inline source vs. saved revision) are named, so an agent can infer this is the execution entry point. There is no explicit guidance on when to prefer this over get_script/save_script, no stated prerequisites, and no mention of the approval-gated flow that affects when an agent should call it.

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