Skip to main content
Glama

uploadMedia

Upload a media file for this beta project and get an attachmentId to pass to replyToTicket, sendAnnouncement, setTaskMedia, setStepMedia, or setBetaAgreement. The upload target must match the tool you will attach with. Two modes with different size limits: pass data (base64) to upload directly (small files, up to 3145728 bytes), or omit data to receive an uploadUrl (large files such as videos, up to 524288000 bytes) — then HTTP PUT the raw bytes to it sending EXACTLY the headers the response lists (Content-Type and x-goog-content-length-range; missing or different headers make the PUT fail), and use the attachmentId afterwards. Uploading alone changes nothing visible; the file only appears once attached. attachmentIds are single-use, bound to this beta project, and expire after about an hour. Every upload is virus-scanned before it can be attached (inline uploads are scanned immediately; URL-mode uploads are scanned when attached). The response fields differ by mode: inline uploads report sizeBytes and scanStatus, URL-mode uploads report uploadUrl, requiredHeaders, and maxBytes.

Input Schema

NameRequiredDescriptionDefault
dataNoThe file content as standard base64 (no data: prefix). Omit to receive a signed uploadUrl instead.
targetYesThe surface this file will be attached to. Must match the attach tool used next. Target 'agreement' (the beta NDA document for setBetaAgreement) accepts application/pdf only.
mimeTypeYesThe exact MIME type of the file (e.g. image/png, video/mp4, application/pdf). Accepted families: images (jpeg, png, gif, webp, heic), video (mp4, quicktime), and files (pdf, plain text, csv, html, pcap, the zip, gzip, tar, 7z and rar archives, and Microsoft Office documents).
productIdYesID of the beta project to query. Get valid IDs from the listProducts tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond that with single-use attachmentIds, ~1 hour expiry, beta-project binding, virus scanning (immediate for inline, deferred to attach time for URL mode), and the fact that an upload alone changes nothing visible. It also warns that the PUT must send exactly the listed headers or fail, which is the kind of operational detail annotations cannot carry. It stops short of describing rate limits or failure/retry semantics, so it is not a 5.

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 text is front-loaded with purpose and downstream tools, then modes, then caveats, and ends with per-mode response fields — a logical order with no filler sentences. It is dense and long, but for a two-mode upload protocol nearly every clause carries actionable information.

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?

With no output schema, the description pre-empts the question of what comes back by listing sizeBytes and scanStatus for inline mode and uploadUrl, requiredHeaders, and maxBytes for URL mode. Combined with expiry, scanning, and single-use rules, an agent has everything needed to call this correctly across both paths.

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 coverage is 100%, so the baseline would be 3, but the description adds data the schema omits: the concrete size ceilings for each mode, the mode switch driven by presence or absence of `data`, and the consequence that target must line up with the next attach call. Those are real semantic additions rather than restatements of the field descriptions.

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 first sentence states a specific verb and resource (upload a media file) and its concrete outcome (an attachmentId), then names the five sibling tools that consume that ID. An agent can distinguish this from getTicketAttachment, removeStepMedia, or any other media sibling without opening a 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?

It gives explicit mode-selection criteria — pass base64 for small files up to 3145728 bytes, omit data for an uploadUrl up to 524288000 bytes such as videos — plus the constraint that the target must match the attach tool used next. When-to-use and when-not-to-use (inline vs URL mode) are both spelled out rather than implied.

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