Skip to main content
Glama

finalize_media_upload

STEP 3 of the media upload flow: call AFTER you have PUT the raw bytes to the presigned uploadUrl from prepare_media_upload. Registers the object as a MediaAsset in the org media library and returns it (its publicUrl is what you pass to schedule_post mediaUrls). Pass the same key/contentType/size from step 1. Idempotent: re-finalizing the same key returns the existing asset. CAPABILITY: draft: creates content that cannot reach an audience on its own. Safe for a draft-only agent token.

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": {
      "key": "<key>",
      "contentType": "<contentType>",
      "size": "<size>"
    },
    "name": "finalize_media_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe object key returned by prepare_media_upload.
sizeYesExact file size in bytes.
contentTypeYesSame MIME type used in prepare_media_upload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior2/5

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

The description adds real context beyond the annotations (capability label 'draft', draft-only token safety, and the returned publicUrl), but it asserts 'Idempotent: re-finalizing the same key returns the existing asset' while the annotations declare idempotentHint=false. That is a direct conflict on an annotated trait, which could lead an agent to retry blindly and duplicate assets.

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?

Front-loaded with 'STEP 3' and the sequencing constraint, then return value, then idempotency, then capability. Every sentence carries operational information; 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?

No output schema exists, and the description compensates by naming the return (a MediaAsset whose publicUrl is used downstream). Sequencing, capability safety, and retry semantics are all addressed, though the retry semantics are stated inconsistently with the annotations.

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 baseline would be 3; the description earns more by tying all three parameters to their origin ('the same key/contentType/size from step 1'), which tells the agent these must match the prepare call rather than be invented.

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 specific verb and resource ('Registers the object as a MediaAsset in the org media library') and pins its position in the flow ('STEP 3 ... after you have PUT the raw bytes to the presigned uploadUrl from prepare_media_upload'). This makes it trivially distinguishable from prepare_media_upload and from upload_media.

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?

Gives an explicit ordering constraint (call AFTER the PUT to the presigned URL), an explicit handoff ('its publicUrl is what you pass to schedule_post mediaUrls'), and an explicit parameter-consistency rule ('Pass the same key/contentType/size from step 1'). An agent knows both when to call it and what to do with the result.

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.