Update Script
update_scriptUpdate an automation script's name or code. Prefer patch over code: it sends only the lines you are changing instead of re-uploading the whole script, which is the single largest token saving available on this server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Full replacement code (optional; prefer `patch`) | |
| name | No | New script name (optional) | |
| patch | No | Anchored edits applied in order. Each old_string must appear exactly once unless replace_all is true; an ambiguous or missing anchor is rejected rather than guessed. Cannot be combined with `code`. | |
| context | No | Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): "Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization." | |
| script_id | Yes | Automation script ID to update | |
| expected_version | No | Version string from a previous get_script/update_script. When supplied, the update is rejected if the script changed in the meantime. |