Skip to main content
Glama

Images: place, optimise and view photos, and stock photos

images
Destructive

For reading use images_read, which is read-only and needs no approval: "view", "stock", "status" here are deprecated (still works). Images for the site: the owner's photos, files saved with fs_import and licensed stock photos. Needs no key and costs nothing. "status": what works, the account's image settings and what to do in your app. "view": look at images in the project (paths: files or a folder such as "data/import"): one comes back at 800 px, several as a numbered contact sheet, each with its real size, orientation (after the EXIF turn), file size, dominant colour and the slot the owner uploaded it for. "place": a photo in the project (from: the owner's, or one saved with fs_import) into its slot on a page (file: the page; slot: the data-lf-placeholder label or "#id"; alt: what this photo shows): makes the web versions at the slot's widths, cropped to its shape (its aspect class or width and height, or aspect: "4:3"; focus), and in an HTML page sets the 's src, srcset, sizes, width, height and alt and removes data-lf-placeholder, changing nothing else (a marked box named or shaped like a photo, or a div role="img" becomes an that keeps its class and style); for a component file (JSX, Vue, …) it returns the tag to put in and its line (a div role="img" stand-in counts as a slot). "edit" operation "optimise": any image in the project (from), sized to max_width and compressed for the web; widths: [800, 1600] makes every width a srcset needs in one call and returns the srcset and the ; aspect: "4:3" crops it to that shape first. Deprecated, going on 2027-02-09: "generate", "style" and the edit operations other than optimise (remove_background, vectorize, crisp_upscale, creative_upscale, replace_background, variations), which make or change images with Recraft on the account's own Recraft key (Account › Images); until then they still work for an account with a key, when the user asks for Recraft, and its costs are theirs. "stock": licensed photos from Unsplash, with no key or cost to the user (query: the mood or scenery; orientation, color, page): one numbered list with small previews to choose from, each marked by its id ("unsplash:…"); at most two searches per image slot. "stock_use": for every stock photo you put on the site (photo_id as listed, used_on e.g. "home hero", alt): records its credit for the owner and returns the to put in. An Unsplash photo is hotlinked (never save it into the project). No credit is needed on the site. Stock sets the mood and scenery (landscape, town, coast, food in general, textures); it never stands in for the owner's own rooms, work, products, team or customers: those stay data-lf-placeholder until their photos arrive.

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": {
      "action": "<action>",
      "project": "<project>"
    },
    "name": "images"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
altNostock_use, place, edit optimise: alt text: what this photo shows (look at it with view first).
fileNoplace: the page file with the slot, e.g. "workspace/site/index.html".
fromNoedit, place: the image in the project (place: the owner's photo).
pageNostock: the next results.
sizeNogenerate/variations: "16:9", "1:1", "1536x768"…
slotNoplace: which data-lf-placeholder to fill: its label (or a unique part of it) or "#id". Left out on a page with one photo slot; a wrong one lists the page's slots.
trimNoCut the empty margin around the subject (cutouts, logos, icons; an SVG's viewBox is fitted to the drawing).
colorNostock: a colour filter.
focusNoplace, edit optimise with aspect: what the crop to the shape keeps (auto: the most interesting part); none keeps the photo's own shape (place without aspect).
pathsNoview: images in the project, or folders (e.g. ["data/import"]); up to 24 images.
queryNostock: the mood or scenery, e.g. "misty mountain valley at dawn".
sizesNoedit optimise, place: the <img> sizes, e.g. "(min-width: 52rem) 45vw, 100vw" (place defaults to the slot's data-lf-sizes, then what its layout classes say, then 100vw, and says which).
styleNogenerate: false to skip the project's Recraft style (the look's colours still apply; colors: false skips those).
actionYes
aspectNoplace, edit optimise: the shape to crop to, width:height ("4:3", "16:9", "1:1") or a number (1.5). place defaults to the slot's shape (an aspect-[4/3], aspect-video or aspect-ratio on it, else its width and height).
colorsNogenerate: false to skip the chosen look's colours and background.
promptNogenerate (deprecated): what to draw. edit replace_background (deprecated): the new background.
sourceNostock: unsplash.
vectorNogenerate: SVG instead of a raster image.
widthsNoedit optimise, place: the widths to make (e.g. [800, 1600]), one file each (name-800.webp, …). place defaults to the slot's data-lf-widths, else its size and twice it.
confirmNo
projectYesProject slug or id.
save_toNoWhere to save, e.g. "workspace/public/images/hero.webp" (the extension is adjusted to the format).
used_onNostock_use: where on the site, in words the owner reads in their portal, e.g. "Home page, top photo", "Find us: the harbour".
photo_idNostock_use: an id from stock's list, e.g. "unsplash:Ab-9".
replacesNostock_use: the stock photo it takes the place of there (dropped from the credits).
max_widthNoWidest the saved image may be, in pixels (default 1920: a full-width hero; 800 suits a card, 256 an avatar). Images are compressed for the web either way.
operationNoedit: what to do.
referencesNostyle: reference images in the project.
orientationNostock.
transparentNoSVGs: remove the background shape so the page shows through.
keep_originalNoAlso save the full-quality original beside it ("-original"), for print or later cropping.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The annotations already flag destructive and open-world behavior, but the description adds substantial operational detail beyond them: exactly what place changes in an HTML page (img attributes only, placeholder removed, nothing else changed), that stock photos are hotlinked and must never be saved into the project, that stock_use records credits, and that deprecated Recraft operations cost against the account's own key. This is rich behavioral disclosure for a mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is valuable and dense, but it is delivered as one long paragraph with nested quoted action names and many clauses, making it hard to scan and not clearly organized by action. Some length is justified for a 33-parameter multi-action tool, but better structure and front-loading would materially improve usability.

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?

Given the tool's complexity, 33 parameters and lack of an output schema, the description covers the current workflows well: it explains what view returns, what place returns for HTML versus component files, what edit optimise returns, and what stock lists. It is nearly complete for practical use, though deprecated operations are only loosely described and error behavior is not addressed.

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?

With 91% schema description coverage, the schema already carries most parameter meaning, so the baseline is 3. The description still adds useful semantics not obvious from the schema, including that a wrong slot lists the page's slots, how place defaults widths/sizes/aspect from the slot, what view returns for one versus several paths, and the two-searches-per-slot stock limit.

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 identifies the tool as site image management and enumerates the current actions (view, place, edit optimise, stock, stock_use) with concrete resources such as owner photos, stock photos and page slots. It explicitly redirects read-only usage to images_read. However, the presence of deprecated generate/style/edit operations and the read redirect makes the core purpose less immediately clear than a single-verb tool.

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?

It explicitly tells the agent to use images_read for reading, names the deprecated operations with their cutoff date, explains when Recraft costs apply and whose key is used, limits stock searches to at most two per image slot, and states that stock photos must not stand in for the owner's own rooms/work/products/team. Those are clear when-to-use, when-not-to-use and alternative-tool instructions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources