Skip to main content
Glama

finalize_media_upload

Finalize a presigned upload started with create_media_upload, after you have PUT every file to its uploadUrl. Verifies the bytes landed, checks size/type, and returns a mediaId (e.g. "upload:abc123") usable in schedule_post_draft or publish_scheduled. For an image batch the single mediaId carries the whole carousel in upload order. The media is durable (hosted on Socialync's bucket), so you can schedule the post for any future publish date.

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": {
      "uploadId": "<uploadId>"
    },
    "name": "finalize_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
uploadIdYesThe uploadId returned by create_media_upload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare it is not read-only, not open-world, and not destructive. The description adds meaningful context beyond that: it verifies bytes landed, checks size/type, returns a durable mediaId, and explains carousel behavior. It stops short of describing failure handling or idempotency, so it is strong but not exhaustive.

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?

The purpose and prerequisite are front-loaded, and every sentence carries useful information: verification behavior, return value, carousel semantics, and durability. 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?

With no output schema, the description appropriately explains the returned mediaId and its downstream use. It covers the happy path well, but does not say what happens when verification fails, which is a minor gap for a finalization step.

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?

There is one parameter and schema description coverage is 100%, so the schema already explains that uploadId comes from create_media_upload. The description reinforces this but adds no syntax or format details beyond 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?

The description states a specific verb and resource: finalizing a presigned upload started with create_media_upload. It distinguishes this tool from siblings by naming the prerequisite (create_media_upload) and downstream consumers (schedule_post_draft, publish_scheduled).

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 gives an explicit condition: use after you have PUT every file to its uploadUrl. It also states the next steps, making the workflow position unambiguous and leaving little to inference.

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.