Skip to main content
Glama

Write a script

myio_script_save
DestructiveIdempotent

Write script slot source and recompile it on the controller, returning compile errors with line and column plus the new state; optionally set enabled to rewrite the #enabled directive.

Instructions

Write the source of script slot N (prog/N.txt) and recompile it on the controller; the answer is the compile result (error with line:col and the source line) and the new state. enabled=true|false rewrites the #enabled directive. The file is the truth (#name, #every 1s, #enabled, #onboot header). Max size: 8 KB on GIGA, 4 KB on Opta. Language reference: myio_reference topic=script. Editor/admin level.

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

Input Schema

NameRequiredDescriptionDefault
idYes
serverNocontroller name (default Ground floor)
sourceYes
enabledNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructive and non-read-only, and the description adds real context beyond them: the write triggers a recompile, the response carries the compile result with line:col and the offending source line plus the new state, and there are hard size caps (8 KB GIGA, 4 KB Opta). The file-is-truth model (#name, #every, #enabled, #onboot header) and permission level are also disclosed.

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?

Front-loaded with the action and the return shape, and every clause carries information (path, recompile, size caps, permissions). It is dense and parenthetical-heavy, which slightly slows parsing, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description covers the return value (compile result with error location, new state), the destructive overwrite, permissions, and size constraints. Nothing an agent needs in order to call this correctly is missing.

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 coverage is only 25% (just the server param), so the description must compensate, and it does: id is the slot index mapped to prog/N.txt, source is the raw script text, and enabled is explained as rewriting the #enabled directive rather than a plain flag. Only the server parameter's default is left to the schema.

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 concrete verb and resource: writing the source of script slot N at prog/N.txt, plus the recompile side effect. That compile step makes it distinguishable in practice from myio_script_get (read) and myio_file_write (generic file), though no sibling is named explicitly.

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 a clear usage context and a prerequisite (editor/admin level) and routes the agent to myio_reference topic=script for the language. It does not say when to prefer myio_file_write over this tool, so the boundary with the generic file tool is left implicit.

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

Deploy Server

Other Tools