Skip to main content
Glama
m4l MCP server

m4l MCP server

patch_validate

Validate Max for Live devices and .maxpat files by checking embedded patchers, duplicate IDs, missing boxes, inlet/outlet counts, parameters, and file references before you commit changes.

Instructions

Check a device: JSON of every embedded patcher, duplicate ids, lines to missing boxes or non-existent inlets/outlets, outlettype counts, in/outlet counts vs what Max gives the object (check_io), subpatcher in/outlet counts, parameters without longname, parameter registry consistency, missing pictures/scripts/ bpatcher files, and whether the container round-trips.

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

Input Schema

NameRequiredDescriptionDefault
pathYes
check_ioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the scope of validation checks and the role of Max's check_io comparison, but it does not state what the tool returns, whether it is strictly read-only, or how failures are surfaced.

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 action and avoids filler, packing many relevant checks into one sentence. It is dense and somewhat run-on, but the information density is appropriate for a complex validator.

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

Completeness2/5

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

This is a complex validation tool with no annotations and no output schema, so the description should clarify the return shape, failure behavior, and path semantics. It lists many checks but leaves the agent without enough information about what the result looks like or how to interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should compensate for both parameters. It mentions check_io in relation to in/outlet counts versus what Max reports, which adds some meaning, but it never explains what 'path' refers to or how the default check_io=true affects behavior.

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?

The description gives a specific verb and resource, 'Check a device', then enumerates concrete validation targets such as duplicate ids, missing boxes, inlet/outlet counts, parameter consistency, and round-tripping. It is clear what the tool does, but it does not explicitly distinguish itself from nearby diagnostic siblings like device_diff or device_info.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to run this validator, when not to, or which alternative sibling to use. The only implied usage is that it checks a device, but no workflow context, prerequisites, or comparison to device_diff/device_info is provided.

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