Skip to main content
Glama

MySaaS Blog

Import uploaded images

media_import

Use this when the user attaches one or more images for a post. Import the files into the authenticated media library and return stable media IDs.

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": {
      "files": "<files>"
    },
    "name": "media_import"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYes
idempotencyKeyNoOptional retry key. Reuse the same key with the same payload to deduplicate agent retries.

Output Schema

NameRequiredDescriptionDefault
mediaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly=false, destructive=false, openWorld=false, and idempotentHint=false; the description usefully adds that files land in the authenticated media library (an auth requirement) and that IDs are stable. It adds nothing about the dedupe behavior implied by idempotencyKey, the 10-file cap, or partial-failure handling for multi-file imports.

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?

Two sentences with zero filler: the usage trigger is front-loaded, followed by the effect and return value. Nothing is repeated from the title 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?

For a low-complexity two-parameter import tool with an output schema, the description covers trigger, destination, and return shape adequately. Remaining gaps (file count limit, supported mime types, retry/idempotency interaction) are meaningful but secondary.

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?

At 50% schema coverage, the files array item fields (download_url, mime_type, file_name) are undocumented and the description does not compensate. It does add that 'one or more' files are expected, matching minItems=1, but never mentions the maxItems=10 cap or per-item requirements.

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?

States a specific verb (import) and resource (image files into the authenticated media library) plus the return value (stable media IDs). It does not explicitly contrast with the sibling media_import_from_url, though the trigger phrase 'user attaches ... images' implicitly points to local uploads rather than remote URLs.

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?

Gives a clear activation condition: use when the user attaches one or more images for a post. It stops short of naming the alternative for URL-based sources (media_import_from_url) or stating when not to use it, so routing between the two import tools 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