Skip to main content
Glama

layer_setMasking

Configure group and per-layer masking modes, including mask-inside-bottom presets and optional pixel expansion, to control which Moho layers are hidden or masked.

Instructions

Configure Group masking (groupMask or one-shot preset: 'mask_inside_bottom') and per-layer masking (maskingMode, expandByPixel, guarded excludeStrokes).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "layer_setMasking"
  }
}

Input Schema

NameRequiredDescriptionDefault
presetNoOne-shot setup: group hide_all, bottom child add_mask, siblings masked
layerIdNoNumeric depth-first layer ID (from layer_list)
groupMaskNo
layerNameNoExact layer name
layerUuidNoLayer UUID
maskingModeNo
expandByPixelNoExpand mask by one pixel to prevent seam halos
invisibleMaskNoUse add_mask_invis for bottom layer with mask_inside_bottom preset
excludeStrokesNoExclude strokes from mask if exposed by active Moho version

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

C2.9/5.0
Behavior2/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 does disclose a useful behavioral nuance that excludeStrokes is 'guarded' by host version and that preset is one-shot, but it never states that this mutation overwrites existing mask state, what happens to sibling child masks, or what confirmation the caller receives.

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?

A single front-loaded sentence with the action first and details in parentheses. It is efficient, though the heavily nested parentheticals pack nine parameters into one clause and read more like a signature than guidance.

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?

With nine optional parameters, no annotations, and no output schema, the definition leaves key call-time questions unanswered: what layer is targeted when no layerId/layerName/layerUuid is given, and whether preset conflicts with the per-layer parameters. The complexity of this tool outstrips the single sentence provided.

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 description coverage is 78%, so the baseline is 3. The description usefully groups parameters into group-mask and per-layer families and names the enum value 'mask_inside_bottom' alongside groupMask, but it adds no precedence rules among preset, maskingMode, invisibleMask, and expandByPixel.

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 names specific configuration targets (group mask via groupMask/preset, per-layer via maskingMode) rather than restating the name, so an agent knows this tool writes mask settings. It never says how it differs from layer_setProperties, which plausibly also touches layer flags, leaving overlap ambiguity.

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 stated when-to-use, when-not-to-use, or alternative beyond the implied 'use this to set masking'. It also doesn't say whether a target must be pre-selected or how preset and the individual mask parameters relate if both are supplied, so the agent must guess invocation order.

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