Skip to main content
Glama

Finish a local file upload (step 2 of 2)

complete_media_upload
Idempotent

After the PUT to upload_url: checks that the stored file has exactly the declared size and type (otherwise the upload is dropped and you start again with create_media_upload), measures a video (width and height as displayed, duration_ms), and makes the media ready for create_post.media_ids. width, height and duration_ms are fallbacks, used only when a video can't be measured. Calling it again returns the same media.

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

Input Schema

NameRequiredDescriptionDefault
widthNoFallback only: used when the video can't be measured.
heightNoFallback only: used when the video can't be measured.
media_idYesmedia_id from create_media_upload
duration_msNoFallback only: used when the video can't be measured.
workspace_idYesWorkspace id from list_workspaces

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations declare idempotentHint=true, but the description adds the concrete consequence (repeat calls return the same media) plus the failure behavior that annotations do not cover: a size/type mismatch drops the stored upload and forces a restart. It also discloses the state transition into create_post.media_ids eligibility.

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?

One front-loaded sentence opens with the trigger condition, and nothing is wasted. The long parenthetical stacking validation, measurement and readiness slightly hurts scannability.

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 still conveys key return semantics (measurements, same media on repeat, ready for media_ids). It stops short of describing the response shape, such as which identifier or status an agent gets back.

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 coverage is 100% and each parameter is already documented, including the "Fallback only" note on width/height/duration_ms, so the description largely restates the schema. Its marginal value is clarifying why those fallbacks exist (video can't be measured), not new syntax or constraints.

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 precise verb set (checks size/type, measures video, makes ready for create_post.media_ids) and frames itself as step 2 of 2, which cleanly separates it from create_media_upload and upload_media_from_url.

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?

"After the PUT to upload_url" gives the exact precondition for invocation, and it names create_media_upload as the restart path on validation failure. It never explicitly contrasts with upload_media_from_url, so the alternative-selection rule is implied rather than 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.

Resources