Skip to main content
Glama

Update Script

update_script

Update 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

NameRequiredDescriptionDefault
codeNoFull replacement code (optional; prefer `patch`)
nameNoNew script name (optional)
patchNoAnchored 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`.
contextNoExplain 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_idYesAutomation script ID to update
expected_versionNoVersion string from a previous get_script/update_script. When supplied, the update is rejected if the script changed in the meantime.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly=false, destructive=false and closed-world, so the safety profile is covered. The description adds the token-cost tradeoff between patch and full code upload, but says nothing about reversibility, what a failed multi-patch update leaves behind, or how concurrency conflicts surface (that lives only in the schema).

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?

Two sentences, both load-bearing: the first states scope, the second states the preferred mode and why. The guidance is front-loaded and there is no filler.

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 6-parameter mutation tool with no output schema, the description plus the rich schema give an agent enough to call it correctly, including version safety via expected_version. The one real gap is disambiguation from the k6 and test-case update siblings, which the description does not address.

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%, including patch anchoring semantics, the code/patch exclusion, and expected_version's optimistic-concurrency behavior, so the schema does the heavy lifting. The description's patch-over-code advice largely restates the schema's own 'prefer `patch`' note rather than adding new parameter meaning.

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?

States a specific verb and resource ('Update an automation script's name or code') so the agent knows exactly what changes. It does not, however, differentiate itself from siblings like k6_update_script or update_test_case, so the agent must infer which update tool targets which artifact.

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?

Gives an explicit preference rule between the two mutation modes ('Prefer `patch` over `code`') with the rationale, which is real decision guidance. It stops short of saying when to use this tool versus k6_update_script or apply_patch_and_run, so alternative-tool routing is left implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources