Skip to main content
Glama

Finalize Image Upload

finalize_image_upload
Idempotent

Confirm and validate an image that was PUT to a request_image_upload URL. Call this AFTER your PUT to upload_url completes. Zarla reads the staged bytes from its own storage, validates magic bytes (rejects non-JPEG/PNG/WebP), enforces 8000×8000 dim cap, strips EXIF, moves the file into Zarla's own image storage, and saves the image to the site's photo library (it will appear in My Photos and list_site_photos). Pass folder to also file it into a media-library folder — the way to make the photo show up in a gallery that's bound to that folder (editor updates immediately; the live site picks it up at the next publish_site). Returns {url, media_item_id, folder, mime, bytes, width, height} — pass the URL to update_block, update_business_info, or update_seo. Single-use: each asset_id can be finalized exactly once.

Annotations: read-only=false, destructive=false, idempotent=true, open-world=false. Why: Moves one staged upload into the site's photo library; nothing existing is overwritten (not destructive). Idempotent: a repeat finds the slot consumed and changes nothing. Closed-world: both the staging area and the photo library are Zarla's own storage — no third-party or user-controlled system is contacted.

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": {
      "asset_id": "<asset_id>"
    },
    "name": "finalize_image_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
altNoAccessibility alt text — overrides what was passed to request_image_upload.
folderNoMedia-library folder NAME to file the photo into (e.g. "Projects"). Matched case-insensitively against the site's existing folders; created if it doesn't exist. Use the folder a gallery is bound to when the user wants the photo to appear in that gallery.
asset_idYesThe asset_id returned by request_image_upload

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations (readOnly=false, destructive=false, idempotent=true, openWorld=false) by disclosing the validation pipeline: magic-byte checks rejecting non-JPEG/PNG/WebP, an 8000×8000 dimension cap, EXIF stripping, and a move into Zarla-owned storage. It also states the single-use constraint and resolves it against idempotency ('a repeat finds the slot consumed and changes nothing'), plus the publish-timing nuance that the live site only reflects the change at the next publish_site.

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?

Front-loaded with the action and the sequencing precondition, then dense with genuinely useful detail; nearly every clause carries information. There is minor redundancy between 'an image that was PUT to a request_image_upload URL' and 'Call this AFTER your PUT to upload_url completes,' and the single paragraph is long enough that the folder guidance is easy to miss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description supplies the return contract itself ({url, media_item_id, folder, mime, bytes, width, height}) and tells the agent what to do with the URL. For a three-parameter mutation with a validation pipeline and single-use semantics, nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the schema baseline already carries parameter documentation. The description still adds meaning beyond it: folder is framed as the way to make a photo appear in a folder-bound gallery, with editor-immediate versus publish-deferred behavior, and the alt override relationship is implied by the workflow framing. It stops short of restating the alt-override rule that only lives in the schema.

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?

Names a specific verb and resource (finalize a staged image upload) and pins its position in the workflow relative to the sibling that creates the staging slot: 'Confirm and validate an image that was PUT to a request_image_upload URL.' An agent can distinguish this from request_image_upload without opening either schema.

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?

Explicit sequencing rule ('Call this AFTER your PUT to upload_url completes'), explicit conditional guidance for the optional folder parameter tied to gallery binding, and explicit downstream routing ('pass the URL to update_block, update_business_info, or update_seo'). When-to-use and what-to-do-next are both stated.

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.