Skip to main content
Glama

Finalize media upload

finalize_media_upload

Register an uploaded R2 object as a media file after the browser PUT completes. Use this to finalize a presigned direct upload before publishing.

Instructions

Record an uploaded R2 object as a media file after the browser PUT (pairs with create_media_upload; used by the composer UI). Use this when a presigned direct upload finished and the file must be registered (advanced).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
r2KeyYesThe r2Key returned by create_media_upload.
widthNoPixel width (images/video).
heightNoPixel height (images/video).
durationNoDuration in seconds (video).
fileNameYesOriginal file name.
mimeTypeYesFile MIME type.
sizeBytesYesFile size in bytes.
Install Server

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already signal this is a mutating operation (readOnlyHint=false) and non-destructive (destructiveHint=false). The description adds useful lifecycle context about the browser PUT and composer UI, but it does not disclose potential side effects, idempotency, required auth, or what the response contains, which would further help an agent reason about behavior.

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?

Two sentences, front-loaded with the primary action and lifecycle context, then the usage condition. Every clause earns its place with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is a mutation with no output schema, and the description covers the essential precondition and workflow context. However, it does not specify what the call returns (e.g., a media ID or status), which is a meaningful gap when no output schema is present. For an advanced internal composer tool, the existing guidance is serviceable but not fully complete.

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 all seven parameters including that r2Key comes from create_media_upload. The description offers no additional parameter-level meaning beyond the schema, so the baseline 3 is 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 clearly states the action ('Record an uploaded R2 object as a media file') and provides sequencing context that distinguishes it from create_media_upload. It positions this as the finalization step after a browser PUT, making the tool's role unambiguous.

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?

The description explicitly says when to use this tool: 'Use this when a presigned direct upload finished and the file must be registered.' It also notes the pairing with create_media_upload and marks the tool as advanced, giving meaningful routing context even though it doesn't enumerate exclusions or alternatives in detail.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/azeemkafridi/bulkpublish-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server