Skip to main content
Glama

Pagetool

Import an image (hosted copy)

import_image

Copies a photo from a public URL (e.g. the business's own website) into Pagetool's image store and returns its hosted url. Use that url in content_json (hero/about/card/gallery image), in edit_section src, or in for create_site_from_html - external image URLs are otherwise dropped. JPEG, PNG, WebP, GIF or AVIF up to 10 MB; resized to 1600px WebP and safety-checked. No public URL (e.g. photos the owner took)? Send data_base64 instead - downscale large photos first. Counts against the site owner's image allowance.

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

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL of a JPEG, PNG, WebP, GIF or AVIF image (e.g. a photo on the business's own website). Never SVG. Max 10 MB. Give url OR data_base64, not both.
formatNoStored format. Default "webp" (smallest). Use "jpeg" for an image you will set as og_image_url (a link-preview share card), because some preview scrapers do not render WebP.
filenameNoOptional original file name, for your own reference; the type is detected from the bytes.
site_keyNoThe site the image is for; it counts against that site owner's image allowance. Defaults to the caller's current draft site when omitted.
data_base64NoThe image itself, base64-encoded (or a data:image/...;base64, URL) - for photos with no public URL, e.g. ones the owner took. Same types and 10 MB limit; downscale large photos before sending. Give url OR data_base64, not both.
draft_tokenNoThe draft token returned by draft_create, if you are working on an anonymous draft. Only needed when your client cannot send the x-pagetool-draft-token header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the mutation profile is covered. The description adds genuinely useful behavior beyond that: server-side resize to 1600px WebP, a safety check, and that the call consumes the site owner's image allowance. It does not cover failure modes (e.g. what happens on an oversized or unreachable URL) or whether re-importing the same URL duplicates storage, which matters given idempotentHint=false.

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?

Front-loaded with the core action and return value, then usage targets, then constraints, then the fallback path. Dense but every clause carries information; no filler.

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?

For a six-parameter mutation tool with no output schema, the description supplies the return value (hosted url), the accepted types and size cap, the transformation applied, and the quota impact. The main residual gap is error/duplicate behavior, which an agent would want given idempotentHint=false.

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%, so every parameter is already documented, including the url/data_base64 exclusivity and the format enum rationale. The description restates the data_base64 fallback and the downscale advice but adds no syntax or constraint beyond the schema, so the baseline of 3 applies.

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 ('Copies a photo from a public URL ... into Pagetool's image store and returns its hosted url'), and the title reinforces the hosted-copy framing. An agent immediately knows this is an ingest-and-host operation, not a listing or editing 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?

Explicitly names the downstream consumers of the returned url (content_json, edit_section src, <img src> in create_site_from_html) and explains why it matters ('external image URLs are otherwise dropped'). It also gives the when-not path: 'No public URL ...? Send data_base64 instead', with a preparatory step (downscale first).

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