Skip to main content
Glama

create_image

Place a raster image as a new rectangle fill or replace an existing node's fill from a local path, URL, or data URI, with optional size and placement.

Instructions

Place a raster image (PNG/JPEG/GIF; max 20 MB, max 4096x4096 px) as a rectangle with an IMAGE fill. source is an absolute local path, an http(s) URL or a data URI — the server loads the bytes. Default size is the image's natural size; give width or height alone to scale proportionally, or both to set the box (scaleMode decides how the image fits). With targetNodeId the image instead replaces the fills of an existing node (frame, rectangle, ellipse, ...) and no node is created. Returns the node plus image {hash, width, height}. Use create_svg for SVG files.

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": {
      "source": "<source>"
    },
    "name": "create_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoPosition relative to parent. If x, y and parentId are all omitted the node is centred in the viewport
yNo
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
nameNo
widthNo
heightNo
sourceYesAbsolute file path, http(s) URL, or data:image/...;base64,... URI
parentIdNoParent frame/group/section id; default current page
scaleModeNoDefault FILL
cornerRadiusNo
targetNodeIdNoSet the image as the fill of this existing node instead of creating a rectangle

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does well on input constraints (20 MB, 4096x4096 px, accepted formats, server-side byte loading from path/URL/data URI) and states the return payload 'node plus image {hash, width, height}'. But it never states the mutation/authorization profile: that it writes into a document, whether the target file must be writable, or how the change can be undone.

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?

Tight and front-loaded: formats and limits first, then source semantics, then sizing, then the alternate mode, then the return value, then the sibling. Dense parenthetical clauses are readable, though the sizing/scaleMode sentence packs three rules into one passage.

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?

With 11 parameters but no output schema, the description covers the essentials an agent needs to call it correctly: source forms, limits, sizing, and both modes, plus the return shape. The remaining gap is behavioral rather than parametric, i.e. no statement about write side effects or permissions on the target file.

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 description coverage is 55%, and the description fills the most important gaps: what `source` accepts, default sizing as natural size, proportional vs. absolute `width`/`height`, how `scaleMode` resolves fitting, and the dual meaning of `targetNodeId`. It leaves `name`, `cornerRadius`, `file`, and `parentId` to the schema, which already documents them, but adds no sizing interaction detail (e.g., scaleMode precedence when both dimensions are given).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Place a raster image ... as a rectangle with an IMAGE fill') and explicitly distinguishes the two operating modes: default node creation vs. `targetNodeId` fill replacement, where 'no node is created.' It also names the sibling boundary (create_svg for SVG).

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

Usage Guidelines5/5

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

Gives explicit routing: use create_svg for SVG files, use targetNodeId when you want to fill an existing frame/rectangle/ellipse rather than create a node, and 'give width or height alone to scale proportionally, or both to set the box.' Conditions that select each behavior are stated, not inferred.

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