Skip to main content
Glama
m4l MCP server

m4l MCP server

device_diff

Compares Max for Live device or .maxpat states to list added, removed, and changed boxes, lines, parameters, and files; defaults to unsaved edits vs disk or compares against another patch file.

Instructions

Structural diff. Default: unsaved in-memory edits vs the file as read from disk. With against (another .amxd/.maxpat path, e.g. a .bak): that file vs the current state. Lists boxes/lines added, removed and changed per embedded file, parameter registry changes, and binary file changes.

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_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
againstNo
max_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully enumerates what the diff reports (boxes/lines added, removed, changed per embedded file, parameter registry changes, binary changes), but never states that the operation is read-only/side-effect free, and says nothing about truncation or result size even though a `max_lines` parameter with a default of 300 strongly implies capped output.

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?

Three dense sentences, front-loaded with the core concept, then the default behavior, then the alternative mode, then the output shape. No filler; the slightly telegraphic phrasing ('Structural diff.', '.amxd/.maxpat') is efficient rather than confusing.

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

Completeness3/5

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

For a three-parameter, no-annotation, no-output-schema tool, the description covers the comparison semantics and the shape of the report reasonably well. Gaps remain around output size limits (`max_lines`) and whether the call has any side effects, which an agent would want before invoking it on a live device file.

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 coverage is 0%, so the description must compensate. It does well for `against`, defining its type (another .amxd/.maxpat path, e.g. a .bak) and the comparison direction; `path` is only implicitly the subject. `max_lines` is completely unaddressed, so one of three parameters has no semantics anywhere.

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 operation ('Structural diff') on a specific resource (a device patch file, including its embedded files) and describes what the output enumerates. It is clearly distinct from sibling tools like device_info or device_status, though it never names a sibling to reinforce the contrast.

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 explicit mode-selection guidance: default compares unsaved in-memory edits against the on-disk file, while supplying `against` compares a different file (e.g. a .bak) against the current state. It lacks guidance on when to prefer this over related tools such as device_revert or device_status, but the two usage modes are unambiguous.

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