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. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, idempotentHint=false, destructiveHint=false, so the description carries the burden. It discloses the two-step flow, the PUT handler behavior (creates Asset doc, validates magic bytes, returns inline), the storage quota pre-charge and refund conditions, the 10-minute expiry, the 50MB cap, and the host-reachability failure mode. This is rich behavioral context beyond what annotations provide.

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?

The description is long but every sentence earns its place: the two-step flow, the alternative tool, the quota/refund behavior, the allowed types, the cap, and the fallback. It is front-loaded with the core flow and the most important usage rule. The fallback paragraph is somewhat verbose but contains critical operational guidance, so the length is justified.

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?

For a tool with 3 required params, an output schema, and no nested objects, the description is complete. It explains the full lifecycle (request → PUT → asset URL → pass to create_post_draft/update_post_draft), the failure mode, the fallback, and the quota implications. An agent has everything needed to invoke it correctly and handle errors.

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 compensate. It names all three parameters ({filename, contentType, sizeBytes}) and adds meaning: sizeBytes is used for quota pre-charging and has a 50MB cap, contentType is restricted to the allowed types list, and filename is part of the upload request. It doesn't give per-parameter syntax details, but the schema already provides types and enums, and the description adds the behavioral significance of sizeBytes.

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 states a specific verb ('Request an asset upload URL'), the resource (asset upload), and the exact two-step flow. It explicitly distinguishes itself from the sibling `upload_asset` tool by naming it and explaining when to prefer this one, so an agent can tell them apart without opening schemas.

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?

The description gives explicit when-to-use guidance ('Always prefer this over the inline `upload_asset` tool for anything larger than ~8KB'), names the alternative, and provides a detailed fallback for sandboxes that can't reach the host. It also warns against retrying and tells the agent exactly what to do instead, which is strong usage guidance.

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