Skip to main content
Glama

Request an asset upload URL

request_asset_upload

Recommended upload tool for images and videos of any size. TWO STEPS only: (1) call this tool with {filename, contentType, sizeBytes} → get back {uploadId, uploadUrl, uploadToken, instructions}. (2) From your bash sandbox, PUT the file bytes to uploadUrl with the Bearer token — the curl command is in instructions. The PUT response is JSON containing the final asset URL you should pass to create_post_draft.mediaUrls or update_post_draft.mediaUrls. No follow-up MCP call is required — the PUT handler creates the Asset doc, validates magic bytes, and returns everything inline. Always prefer this over the inline upload_asset tool for anything larger than ~8KB — bytes-through-tool-args truncates. Pre-charges your storage quota by sizeBytes to defeat the concurrent-request TOCTOU race; refunded automatically if you never PUT within 10 min, or if the actual upload size is smaller than declared, or if the PUT fails magic-byte validation. Allowed types: JPEG, PNG, WebP, GIF, MP4, WebM. Per-request hard cap: 50MB on top of your plan's storage limit.

IF YOUR SANDBOX CAN'T REACH mcp.postnext.io (e.g. you receive x-deny-reason: host_not_allowed from your bash curl), DO NOT KEEP RETRYING — the host isn't addressable from your environment. Tell the user to upload the image manually at https://app.postnext.io/my-assets, then ask them to paste back the asset URL so you can use it in create_post_draft.mediaUrls. This is the documented fallback for environments with restricted egress (most notably the Claude.ai chat sandbox, whose allowlist is fixed). Also: do not call this tool again expecting a different uploadUrl — every uploadUrl points at the same host.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
sizeBytesYes
contentTypeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
uploadIdYes
uploadUrlYes
uploadTokenYes
instructionsYes
expiresInSecondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the basic safety quadrant; the description adds substantial behavioral context beyond them: quota pre-charging to defeat a TOCTOU race, automatic refund conditions (no PUT in 10 min, undersized upload, magic-byte failure), the 50MB hard cap, and that the PUT handler creates the Asset doc and validates magic bytes. This is exactly the kind of non-obvious behavior an agent needs.

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-loads the recommendation and the two-step workflow before the caveats, and every sentence carries operational content. It is long, but the length is justified by genuine complexity; there is minor redundancy in the repeated warnings about not retrying, keeping it below a 5.

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

Completeness5/5

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

Covers the full call lifecycle — request, out-of-band PUT, inline asset-URL return usable in create_post_draft/update_post_draft — plus failure modes, fallback, and quota accounting. An output schema exists, yet the description still tells the agent what the PUT response yields, so nothing needed to invoke correctly is missing.

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 description coverage is 0%, so the description must carry the load, and it largely does: it names all three params ({filename, contentType, sizeBytes}), enumerates the allowed content types matching the enum, and states the 50MB cap and size-based quota pre-charge for sizeBytes. Only filename's semantics are left thin, so it falls just short of fully compensating.

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+resource ('request' an 'asset upload URL' as the 'Recommended upload tool for images and videos') and explicitly distinguishes itself from the sibling `upload_asset` tool. An agent can tell exactly what this does and when it beats the alternative without opening either 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 when-to-use ('images and videos of any size', 'anything larger than ~8KB'), when-not ('do not call this tool again expecting a different uploadUrl'), and names the alternative (`upload_asset`). It also documents the egress-restricted fallback path with the manual-upload workaround, so nothing is left to inference.

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