Skip to main content
Glama

Write a file

myio_file_write
DestructiveIdempotent

Upload text or binary files to a myIO controller, creating or overwriting them and optionally creating missing parent folders.

Instructions

Upload a file to the controller (creates or overwrites; the write is not atomic). content = text (UTF-8) or base64 = binary. make_dirs=true creates missing parent folders. System files (network, passwords, licence, cloud keys, web UI folders htm/ js/, slot folders) need MYIO_WRITE=admin. For flows.jsn / prog/N.txt prefer myio_flow_save / myio_script_save (validated + reloaded). 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": {
      "path": "<path>"
    },
    "name": "myio_file_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
volNoq = internal flash (GIGA/Opta default), s = SD card (the only volume on a Due)
pathYes
base64No
serverNocontroller name (default Ground floor)
contentNo
make_dirsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the crucial facts that writes are non-atomic and that system paths (network, passwords, licence, cloud keys, htm/js, slot folders) require MYIO_WRITE=admin. That is real value beyond the structured fields, though it says nothing about size limits, error behavior, or what a successful call returns.

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?

The mutation/atomicity caveat is front-loaded, then parameters, then permissions, then alternatives — each sentence carries distinct information with no restatement of the name or title. The telegraphic phrasing is dense but readable.

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 six-parameter destructive write with no output schema, the definition covers the essential hazards: overwrite, non-atomicity, parent-directory creation, and admin gating. What's missing is any indication of the response or of the meaning of 'path'/'server', which an agent would still have to infer.

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 33%, so the description has to carry weight, and it does: it explains that content is UTF-8 text versus base64 for binary and that make_dirs=true creates missing parents. The required 'path' parameter and 'server' remain undocumented in both places, which keeps it short of full marks.

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 first clause states a specific verb and resource ('Upload a file to the controller') and immediately qualifies the write mode ('creates or overwrites'). It also names the sibling tools (myio_flow_save / myio_script_save) that should be preferred for specific file types, so the agent can separate this generic writer from the validated save paths.

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?

It gives a concrete routing rule — use myio_flow_save for flows.jsn and myio_script_save for prog/N.txt because those validate and reload — plus a permission precondition for system paths. It does not say when this tool is preferable to myio_file_op or myio_file_read, so the coverage is good but not exhaustive.

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