Skip to main content
Glama

Finalize Upload

finalize_media_upload

Finalize a presigned URL media upload. Call after uploading to the upload_url from upload_media, or after PUTting bytes directly to an upload_url minted by get_media_upload_url. Needs only { asset_id, domain } plus the same MCP/API token already on this session — no browser or cookie. Validates the file and processes dimensions/thumbnails — for a PDF that means rasterizing page one into a badged thumbnail. Bytes that are not really a PDF are rejected; a genuine PDF that will not rasterize still finalizes, just without a preview.

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

Input Schema

NameRequiredDescriptionDefault
domainYes
asset_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With only destructiveHint: false in annotations, the description carries the load well: it discloses validation, dimension/thumbnail processing, the PDF page-one rasterization case, and the important partial-failure branch where a non-rasterizable PDF still finalizes without a preview. It also states the auth model (session MCP/API token, no browser/cookie). It stops short of saying what the call returns on success, which for a write/finalize tool would be useful, so it lands just under the top score.

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?

Front-loaded and logically ordered: purpose, when to call, minimal inputs/auth, then processing behavior and edge cases. Dense but every sentence carries information; the PDF elaboration is the one place it verges on over-explaining.

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?

For a two-parameter finalize operation with no output schema, the description covers prerequisites, auth, validation, and failure semantics well enough to call it correctly. The notable gap is the absence of any statement about what the tool returns (an asset record, URL, status), which the missing output schema leaves entirely undocumented.

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 0%, so the description must compensate. It does clarify that only { asset_id, domain } are required and that auth comes from the session rather than a parameter, which is real value, but it never explains what 'domain' identifies (workspace? brand?) or where asset_id comes from. Partial compensation for a two-parameter tool.

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?

Opens with a specific verb and resource: 'Finalize a presigned URL media upload.' It also names the two sibling tools it follows (upload_media, get_media_upload_url), so an agent can place it in the upload workflow without opening any schema.

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 explicit ordering ('Call after uploading...') and covers both entry paths, including bytes PUT directly to a URL minted by get_media_upload_url. The precondition is unambiguous, so the agent knows exactly when this tool applies versus the sibling mint/upload tools.

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