Skip to main content
Glama
m4l MCP server

m4l MCP server

device_save

Writes in-memory Max device state to disk with backups and verification, atomically replacing files and blocking risky saves when an editor is open or the file changed unless forced.

Instructions

Write the in-memory state. Refuses while a Max editor window for the target device is open (writing then has crashed Live: ask the user to close that window WITHOUT saving, then retry). Refuses if the file changed on disk since it was read (force=true overrides; the on-disk version is backed up first). Always backs up the file being replaced, re-parses and verifies the bytes, then writes a temp file and atomically replaces. dest saves elsewhere (overwrite=true to replace an existing file). ignore_open_editor only for a known false match.

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": "device_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
destNo
pathYes
forceNo
overwriteNo
ignore_open_editorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: it discloses that a prior crash occurred in this scenario, that a backup is always taken, that bytes are re-parsed and verified, and that the write is atomic via temp file. It also states the exact remedy for the open-editor refusal, which is behavior an agent could not infer from schema alone.

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 critical action and the crash hazard are front-loaded, and the parentheticals carry non-obvious operational detail efficiently. It is dense but nearly every clause adds information; only the nesting of dest/overwrite/ignore_open_editor notes feels slightly tacked on at the end.

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 five-parameter mutation tool with no annotations and no output schema, the description covers failure modes, backup guarantees, and write mechanics well. It still does not say what the tool returns on success or clarify whether `path` refers to a device path or a filesystem path, which an agent needs before calling.

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 0%, so the description must compensate, and it explains four of five parameters meaningfully: dest ('saves elsewhere'), overwrite (replace existing file), force (override the disk-changed refusal, with backup), and ignore_open_editor ('only for a known false match'). The required `path` parameter is never explained, leaving a gap between 4 and 5.

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?

Opens with a concrete verb+resource: 'Write the in-memory state.' An agent can tell this persists device state rather than reading, diffing, or reverting it. It never names a sibling or clarifies how it differs from e.g. device_put_file, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through refusal conditions ('Refuses while a Max editor window ... is open', 'Refuses if the file changed on disk') which tell the agent when the call will fail and how to recover. However, there is no explicit statement of when to choose this over sibling write paths, and no preconditions guidance beyond the failure notes.

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