Skip to main content
Glama

document_import

Imports PNG, JPG, WebP, SVG, PSD, and Moho files into live Moho projects, creating editable ImageLayers or using SVG/FileImport controls for scaling, consolidation, and layer placement.

Instructions

Import a PNG/JPG/WebP image directly as a live ImageLayer, import SVG headlessly through Moho 14.4 SS_SVGImport (with scaling/consolidation controls), or import PSD/Moho files via FileImport.

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

Input Schema

NameRequiredDescriptionDefault
modeNoMoho FileImport mode (default 0)
nameNoOptional layer name for imported ImageLayer
pathYesAbsolute file path to import
minifyNoFor .svg via SS_SVGImport: enable layer consolidation (default: true)
recenterNoFor .svg via SS_SVGImport: recenter artwork in canvas
scaleModeNoFor .svg via SS_SVGImport: canvas-fit or asset-relative scaling preset
asImageLayerNoCreate an ImageLayer and call SetSourceImage (default true for raster images)
expandGroupsNoFor .svg via SS_SVGImport: expand imported group hierarchy
minifyGroupsNoFor .svg via SS_SVGImport: ungroup single-child groups
minifyLayersNoFor .svg via SS_SVGImport: combine adjacent vector layers
parentLayerIdNoOptional parent Group/Bone layer ID
parentLayerNameNoOptional parent Group/Bone layer name
requireSvgBridgeNoReturn an error instead of falling back to FileImport if SS_SVGImport fails
useNativeSvgImportNoForce Moho's legacy FileImport instead of SS_SVGImport for .svg
minifyLayersUnnamedNoFor .svg via SS_SVGImport: consolidate only unnamed layers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are supplied, so the description must carry the behavioral load. It usefully discloses that raster images become live ImageLayers, SVG imports run headlessly through SS_SVGImport with scaling/consolidation controls, and PSD/Moho files use FileImport, but it omits permissions, overwrite behavior, failure modes, and return details.

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 definition is a single front-loaded sentence that lists the three import paths in a logical order. It is dense but every clause contributes to format routing and no wording is wasted.

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 15-parameter tool with no annotations and no output schema, the description provides the high-level import routing but does not say what is returned or how errors are handled beyond the single SVG fallback flag. The rich schema covers parameters, so it is callable, but the definition leaves meaningful gaps.

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 100%, with all 15 parameters documented in the schema, so the baseline is 3. The description only alludes to SVG scaling/consolidation controls and adds no parameter-level semantics beyond what the schema already provides.

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 a specific verb (Import) and resource (document assets) and distinguishes three format pipelines: raster to ImageLayer, SVG via SS_SVGImport, and PSD/Moho via FileImport. It is clear what the tool does, though it does not explicitly distinguish itself from document_open.

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?

It implies when each import path applies by file type and mentions the SVG import mechanism, but gives no explicit guidance on when to choose document_import over document_open or other document tools, and no exclusions. Usage is inferable but not explicitly routed.

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