Skip to main content
Glama

Finalize image upload

finalize_image_upload

Step 2 of 2 for adding an image: call this AFTER you have PUT the file to the uploadUrl returned by prepare_image_upload. It verifies the uploaded object in storage, records it in the team media library and returns a media id + public URL. To use the image as a quiz cover or a landing-page cover, call update_form with flagImg or landingImage set to the returned media id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altNoOptional alt text for the image.
keyYesThe object key returned by prepare_image_upload.
filenameYesOriginal filename for admin display / download (same value passed to prepare_image_upload).
mimeTypeYesImage MIME type used at prepare time. Must be one of image/png, image/jpeg, image/gif, image/webp.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoPermanent object key
urlNoPublic URL of the stored image
mediaIdNoMedia id — pass it to update_form as flagImg / landingImage
filenameNoOriginal filename
filesizeNoSize in bytes, as measured on storage
mimeTypeNoDetected image MIME type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate this is a mutating, non-destructive operation. The description adds meaningful side-effect context: it verifies the object in storage, records it in the media library, and returns a media id + public URL. Failure modes and auth requirements aren't detailed, but the core behavior is well disclosed.

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?

Three compact, front-loaded sentences with no filler. The critical timing constraint is stated immediately, and the next-step guidance is presented efficiently.

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?

With a rich output schema, fully documented parameters, and a description that covers workflow position, side effects, and downstream usage, an agent has everything needed to invoke the tool correctly and understand its result.

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?

The input schema already documents all 4 parameters with good descriptions at 100% coverage. The description reinforces that key, filename, and mimeType come from the prepare step, but adds limited new parameter-level meaning beyond what the schema provides.

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?

The description clearly identifies this as step 2 of a 2-step upload flow, specifying the exact action (verify, record, return media id + public URL) and distinguishing it from prepare_image_upload and update_form. An agent can immediately understand what this tool does and how it fits.

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 states when to call this tool ('AFTER you have PUT the file to the uploadUrl') and what to do next ('call update_form with flagImg or landingImage'), providing clear sequencing and pointing to the relevant sibling alternatives.

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