Skip to main content
Glama
drive-it
by jedbjorn

save_script

Save a new draft script or an immutable revision of an existing script in the current workspace library, carrying omitted metadata forward from the prior revision.

Instructions

Save a new draft script, or a new immutable draft revision of an existing script, in the current workspace library. Omitted metadata on a new revision is carried from the previous revision. Never promotes.

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": {
      "source": "<source>"
    },
    "name": "save_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoDisplay name; required for a new script
domainNoModeling domain, such as levels, walls, or families
sourceYesPython source run by execute_script with args, files, revit, and checks
outputsNoWhat result and checks the script reports
purposeNoOne-line purpose
scriptIdNoExisting script to revise; omit to create a new script
assumptionsNoContext needed to judge applicability
inputSchemaNoJSON Schema (type object) for arguments, with defaults; required for a new script
capabilitiesNoRequired fixed-runtime capabilities, such as revit.create_level or files.write
documentKindNoDocument kind the script targets; required for a new script
sourceRunIdsNoCompleted runs that executed exactly this source, kept as provenance
idempotencyKeyNoRetrying the same key returns the existing revision
expectedEffectsNoExpected model or file effects

Output Schema

NameRequiredDescriptionDefault
scriptYes
createdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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 burden and does real work: it discloses the draft-only state, that revisions are immutable, that omitted metadata is inherited from the prior revision, and that saving never changes promotion status. Remaining gaps are what a failed save returns and any permission requirements.

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?

Three short sentences, front-loaded with the main action, followed by the inheritance rule and the decisive 'Never promotes' qualifier. No filler or restatement of the tool name.

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 13-parameter mutation tool with a fully documented schema and an output schema, the description covers the essential behavioral facts an agent needs: draft semantics, immutability, metadata defaults, and non-promotion. Minor gaps around overwrite/conflict behavior are acceptable given idempotencyKey is documented in the schema.

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 already 100% across all 13 parameters, so the baseline is 3. The description adds genuine meaning beyond the schema by explaining that omitted metadata fields on a revision default to the previous revision's values, which is not stated per-parameter.

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+resource ('Save a new draft script, or a new immutable draft revision of an existing script') with scope ('current workspace library') and ends with 'Never promotes,' which immediately distinguishes it from the promote_script sibling.

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?

The create-vs-revise condition is explicit (new script vs new revision of an existing one, keyed by scriptId in the schema), and 'Never promotes' rules out the promote_script path. It stops short of naming promote_script/execute_script directly or stating when not to use this at all (e.g. editing a promoted script).

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