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
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name; required for a new script | |
| domain | No | Modeling domain, such as levels, walls, or families | |
| source | Yes | Python source run by execute_script with args, files, revit, and checks | |
| outputs | No | What result and checks the script reports | |
| purpose | No | One-line purpose | |
| scriptId | No | Existing script to revise; omit to create a new script | |
| assumptions | No | Context needed to judge applicability | |
| inputSchema | No | JSON Schema (type object) for arguments, with defaults; required for a new script | |
| capabilities | No | Required fixed-runtime capabilities, such as revit.create_level or files.write | |
| documentKind | No | Document kind the script targets; required for a new script | |
| sourceRunIds | No | Completed runs that executed exactly this source, kept as provenance | |
| idempotencyKey | No | Retrying the same key returns the existing revision | |
| expectedEffects | No | Expected model or file effects |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| created | Yes |