Skip to main content
Glama

Prepare a media upload

dub_create_upload
Idempotent

Creates an upload slot. Send the actual file bytes to the returned HTTP upload URL, then complete it. This tool does not import a ChatGPT attachment or an arbitrary URL.

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": {
      "fileName": "<fileName>",
      "mimeType": "<mimeType>",
      "sizeBytes": "<sizeBytes>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "dub_create_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNameYesThe filename with its actual media extension, for example interview.wav or clip.mp4.
mimeTypeYesThe actual media MIME type, for example audio/wav or video/mp4.
sizeBytesYesThe exact byte length of the source file.
idempotencyKeyYesA stable unique key for this operation. Reuse it with the exact same input after a timeout; never generate a new key to retry.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / fileName / description
      Added value: +"The filename with its actual media extension, for example interview.wav or clip.mp4."
    • addedInput schema / properties / mimeType / description
      Added value: +"The actual media MIME type, for example audio/wav or video/mp4."
    • addedInput schema / properties / sizeBytes / description
      Added value: +"The exact byte length of the source file."
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / data / additionalProperties
      Added value: +false
    • removedOutput schema / properties / data / description
      Removed value: -"The safe public API response, or resumable-upload status."
    • addedOutput schema / properties / data / properties
      Added value: +{
      +  "assetId": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "completeUrl": {
      +    "format": "uri",
      +    "type": "string"
      +  },
      +  "expiresInSeconds": {
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "maxBytes": {
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "method": {
      +    "const": "PATCH",
      +    "type": "string"
      +  },
      +  "mimeType": {
      +    "type": "string"
      +  },
      +  "partSizeBytes": {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  "protocol": {
      +    "const": "tus",
      +    "type": "string"
      +  },
      +  "uploadLength": {
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "uploadUrl": {
      +    "format": "uri",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / data / required
      Added value: +[
      +  "assetId",
      +  "uploadUrl",
      +  "completeUrl"
      +]
    • addedOutput schema / properties / data / type
      Added value: +"object"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely new behavioral information: this is only the first step of a two-phase upload, and it returns an HTTP upload URL that the caller must post bytes to before completing. It does not discuss URL expiry or per-account limits, which would be the remaining valuable additions.

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?

Three short sentences, front-loaded with the core action, then the workflow, then the exclusion. Every sentence carries distinct decision-relevant information with no repetition of the schema or annotations.

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?

An output schema exists, so return values need no explanation, and the description covers the critical handoff to the returned upload URL and to dub_complete_upload. For a four-parameter, fully documented tool this is close to sufficient; only lifecycle details like upload URL validity would add more.

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% and every parameter (fileName, mimeType, sizeBytes, idempotencyKey) is already documented in the schema with examples, constraints, and retry semantics. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Creates an upload slot" is a specific verb+resource, and the follow-up sentence clarifies that this only allocates a destination rather than performing a transfer or import. The explicit exclusion of ChatGPT attachments and arbitrary URLs further separates it from import-style siblings such as dub_import_file, though no sibling is named directly.

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?

It gives clear positive guidance (send the file bytes to the returned URL, then complete it) and explicit negative guidance (not for ChatGPT attachments or arbitrary URLs). The alternative for those cases is only implied, not named, which keeps it short of a full 5.

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