Skip to main content
Glama

Upload media image file

upload_media_image_file

Uploads an authorized ChatGPT image file reference to the tenant media library and returns the optimized inviomail image URL. Requires OpenAI Apps SDK file handling support. Only call this tool when the host supplies an authorized image file reference with download_url and file_id; do not invent these values and do not pass public URLs or Base64. Images up to about 5 MB and roughly 1000-2000 px are fine; inviomail optimizes them after upload.

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": {
      "image": "<image>",
      "description": "<description>"
    },
    "name": "upload_media_image_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesAuthorized ChatGPT file reference with download_url and file_id
favoriteNoMark the uploaded image as a tenant favorite
campaignIdNoOptional campaign whose image folder should receive the file
descriptionYesMeaningful description for future image selection and alt text

Output Schema

NameRequiredDescriptionDefault
imageYes
requestIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, and the description adds genuine context: an OpenAI Apps SDK file-handling prerequisite, ~5 MB / 1000-2000 px acceptance limits, and server-side optimization. It does not disclose duplicate-upload behavior or what happens when the limits are exceeded, which matters for a non-idempotent write.

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?

Four sentences, front-loaded with purpose and immediately followed by the hard precondition and prohibitions. The 'do not invent these values' clause slightly duplicates the preceding requirement, but no sentence is wasted padding.

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?

With an output schema present, the description needn't spell out return shape, and it still notes the optimized URL outcome. For a mutation tool with a nested object parameter, it covers prerequisites, source constraints, and size bounds; only failure/duplication behavior is left unaddressed.

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 the nested image object is fully documented, so the baseline of 3 applies. The description reinforces the image object's provenance constraint but says nothing about favorite, campaignId, or the minimum-length description, leaving that entirely to the schema.

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?

The description gives a specific verb and resource ('Uploads an authorized ChatGPT image file reference to the tenant media library') plus the outcome ('returns the optimized inviomail image URL'). It implicitly distinguishes itself from URL- or Base64-based siblings by forbidding public URLs and Base64, though it never names import_media_image_from_url explicitly.

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?

States a clear precondition ('Only call this tool when the host supplies an authorized image file reference with download_url and file_id') and explicit prohibitions ('do not invent these values', 'do not pass public URLs or Base64'). It stops short of naming the alternative tool an agent should use when it only has a public URL.

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