Skip to main content
Glama

Finish a media upload

finish_media_upload
DestructiveIdempotent

[Admin] Last step of start_media_upload: checks the stored file and makes it usable. A file that is not what was declared, a video that is not H.264, or an SVG with anything active is removed and the error says why. replaced says whether a replacement took effect.

Every argument in full, with examples: get_tool_reference.

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": {
      "media_id": "<media_id>"
    },
    "name": "finish_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthNoWidth in pixels of an image or video.
heightNoHeight in pixels of an image or video.
media_idYesThe media_id from start_media_upload.
llm_modelNoYour model id, e.g. "claude-opus-4-8"; "unknown" if unsure. For analytics.
poster_urlNoStill image shown before a video plays: the `url` of an image in this company's library.
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.
duration_secondsNoLength of a video or audio file in seconds.

Output Schema

NameRequiredDescriptionDefault
fileYes
replacedYes
warningsYes
drafts_updatedYes
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / height / exclusiveMinimum
      Previous value: -1New value: +0
    • removedInput schema / properties / height / minimum
      Removed value: -0
    • changedInput schema / properties / media_id / description
      Previous value: -"The media_id from media-upload-start."New value: +"The media_id from start_media_upload."
    • changedInput schema / properties / width / exclusiveMinimum
      Previous value: -1New value: +0
    • removedInput schema / properties / width / minimum
      Removed value: -0
  2. Changed30 schema fields changed
    • removedInput schema / properties / duration_seconds / example
      Removed value: -42.5
    • removedInput schema / properties / height / example
      Removed value: -900
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Your model id, e.g. \"claude-opus-4-8\"; \"unknown\" if unsure. For analytics.",
      +  "type": "string"
      +}
    • removedInput schema / properties / width / example
      Removed value: -1600
    • removedOutput schema / properties / drafts_updated / description
      Removed value: -"Page drafts moved to the new address when a file was replaced. Published pages keep the old address until they are published again."
    • removedOutput schema / properties / file / properties / alt / description
      Removed value: -"Alt text per language code, such as {\"en\": \"Our team\"}."
    • removedOutput schema / properties / file / properties / content_type / description
      Removed value: -"Content type of the file."
    • removedOutput schema / properties / file / properties / content_type / example
      Removed value: -"image/jpeg"
    • removedOutput schema / properties / file / properties / duration_seconds / description
      Removed value: -"Length of a video or audio file in seconds, as sent to media-upload-finish."
    • removedOutput schema / properties / file / properties / file_name / description
      Removed value: -"Display name in the library."
    • removedOutput schema / properties / file / properties / file_name / example
      Removed value: -"team-photo.jpg"
    • removedOutput schema / properties / file / properties / focal_x / description
      Removed value: -"Horizontal focal point, 0 (left) to 1 (right)."
    • removedOutput schema / properties / file / properties / focal_y / description
      Removed value: -"Vertical focal point, 0 (top) to 1 (bottom)."
    • removedOutput schema / properties / file / properties / folder / description
      Removed value: -"Library folder; \"\" is the top. It is the directory of the file in storage."
    • removedOutput schema / properties / file / properties / folder / example
      Removed value: -"team"
    • removedOutput schema / properties / file / properties / height / description
      Removed value: -"Height in pixels, as sent to media-upload-finish."
    • removedOutput schema / properties / file / properties / id / description
      Removed value: -"Id of the file (media_id)."
    • removedOutput schema / properties / file / properties / id / example
      Removed value: -"c9d6f121-1230-48fd-b3a7-8b5a1e8db052"
    • removedOutput schema / properties / file / properties / kind / description
      Removed value: -"image, video, audio or font."
    • removedOutput schema / properties / file / properties / merchant_id / description
      Removed value: -"Company whose library holds the file."
    • removedOutput schema / properties / file / properties / path / description
      Removed value: -"Object name in the public bucket: <merchant_id>/[<folder>/]<file>."
    • removedOutput schema / properties / file / properties / poster_url / description
      Removed value: -"Still image shown before a video plays."
    • removedOutput schema / properties / file / properties / read_only / description
      Removed value: -"True for a file of the parent company's library: it can be used on pages but not changed or deleted."
    • removedOutput schema / properties / file / properties / size_bytes / description
      Removed value: -"Size of the file in bytes, measured after the upload."
    • removedOutput schema / properties / file / properties / status / description
      Removed value: -"uploading until media-upload-finish accepts the file, then ready."
    • removedOutput schema / properties / file / properties / url / description
      Removed value: -"Public address of the file, served by the CDN. It changes when the file is replaced."
    • removedOutput schema / properties / file / properties / version / description
      Removed value: -"Goes up each time the file is replaced."
    • removedOutput schema / properties / file / properties / width / description
      Removed value: -"Width in pixels, as sent to media-upload-finish."
    • removedOutput schema / properties / replaced / description
      Removed value: -"True when this call swapped in a new version of an existing file. False on a new file, and when no replacement was waiting (a repeated call, or an upload that never arrived)."
    • removedOutput schema / properties / warnings / description
      Removed value: -"Things worth telling the person. The file was accepted."
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds substantive context beyond them: it names exactly what gets destroyed (mismatched declared type, non-H.264 video, SVG with active content), that failures surface a reason in the error, and that `replaced` indicates whether a replacement took effect. That is real behavioral disclosure, though it does not address permissions or the admin scope implied by the [Admin] tag.

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?

Two tight sentences front-load the purpose and validation behavior, followed by the return-field note and a single reference pointer. Nothing is padded, though the get_tool_reference pointer occupies space that adds little to a covered schema.

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 an output schema present the description need not explain return values, and it still highlights the meaningful one (`replaced`) plus error behavior. Combined with full schema coverage, an agent has enough to call this correctly; only permission/auth requirements for a destructive admin tool are left implicit.

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 the schema already explains media_id, dimensions, poster_url, duration_seconds, and the analytics fields. The description adds no meaning to individual parameters and instead defers with 'Every argument in full, with examples: get_tool_reference', leaving the baseline of 3 appropriate.

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 states a concrete verb and resource ('checks the stored file and makes it usable') and anchors itself as the final stage of start_media_upload, which separates it from upload_media_file, start_media_upload, and manage_media_file in the sibling list. An agent can immediately tell this is a finalize/validate step rather than an upload or a listing call.

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

Usage Guidelines4/5

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

It clearly establishes the ordering precondition by calling itself the 'Last step of start_media_upload', so an agent knows to invoke it only after that prerequisite. It does not state exclusions explicitly, e.g. whether upload_media_file is a one-shot alternative that never needs this call, which keeps it short of a 5.

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.