Skip to main content
Glama
inscada-app

@inscada/mcp-server

Official
by inscada-app

update_script

Destructive

Update an inSCADA script by replacing its code with a new Nashorn ES5 compliant script. Requires script ID and code, and prior reading with get_script.

Instructions

Update script code. Read with get_script first. Call inscada_guide for full script rules and ins.* API reference.

CRITICAL RULES (always apply):

  • Nashorn ECMAScript 5 ONLY. DO NOT USE: let, const, =>, template literals, destructuring, async/await, class.

  • STRUCTURE: function main() { /* code */ } main();

  • Historical date: dttm is ISO string, NOT epoch. new Date(isoString) returns NaN in Nashorn. Use: ("" + items[i].dttm).substring(11, 19)

  • Logged data is reverse-ordered (newest first) → use reverse loop for charts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYesScript ID (required)
codeYesNew script code (full code). Nashorn ES5: function main(){...} main(); structure required.
Behavior5/5

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

Beyond annotations (destructiveHint, openWorldHint), the description adds critical behavioral constraints: enforced Nashorn ES5, specific syntax, date handling, and data ordering. This provides essential context for correct tool invocation.

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?

The description is front-loaded with the core purpose, followed by critical rules in a bulleted list. It is fairly concise for the complexity, though the rules could be slightly reorganized for clarity.

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?

Given the tool's complexity and lack of output schema, the description covers essential behavioral aspects and references further resources. It does not explain post-update effects, but annotations and sibling tools mitigate this gap.

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?

Both parameters are fully documented in schema (100% coverage). The description adds significant value by detailing Nashorn ES5 rules, date caveats, and code structure, which are not fully captured in the schema's param descriptions.

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?

The description clearly states 'Update script code' and provides detailed critical rules. It distinguishes from siblings like 'get_script' (read) and 'inscada_run_script' (run), making the tool's purpose unambiguous.

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 description advises to read with 'get_script' first and consult 'inscada_guide' for full rules, providing context for safe use. It doesn't explicitly list when not to use, but the critical rules imply necessary prerequisites.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/inscada-app/ins-mcp-desktop-extension'

If you have feedback or need assistance with the MCP directory API, please join our Discord server