Skip to main content
Glama

Head Swap

head_swap_create_image

Swap a head onto a body image. Each image costs 10 credits. Output resolution depends on your subscription; you may set max_resolution lower than your plan maximum if desired.

MCP guidance:

  • This starts an async image generation job and returns id plus credits_charged immediately. If the user wants the finished result, call the wait_for_image_project helper with the returned id, or poll the matching GET /v1/image-projects/{id} endpoint until status is complete, error, or canceled. Completed projects include downloads with direct URLs. The custom wait helper also returns exact_download_urls separately from expiration metadata.

  • For *_file_path values, prefer an existing Magic Hour file path or a file_path returned by the upload-URL endpoint after the file bytes are uploaded. Direct public media URLs may work when they are stable, fetchable, and return raw file bytes, but hotlinked URLs can fail; when in doubt, use the presigned upload flow first and pass the returned file_path.

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoGive your image a custom name for easy identification.Head Swap - dateTime
assetsYesProvide the body and head images for head swap
max_resolutionNoConstrains the larger dimension (height or width) of the output. Omit to use the maximum allowed for your plan (capped at 2048px). Values above your plan maximum are clamped down to your plan's maximum.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the image. We charge credits right when the request is made. If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      -  "type": "string"
      -}
  2. Changed1 schema field changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations cover only the safety profile (readOnlyHint false, destructiveHint false, openWorldHint true). The description goes well beyond: it discloses pricing (10 credits per image), that the call is async and immediately returns id plus credits_charged, how to poll/wait, that completed projects include downloads, and the file-path/upload-flow requirement. This is rich, non-redundant behavioral context.

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?

Purpose is front-loaded in the first sentence, followed by structured MCP-guidance bullets that each carry distinct information (async flow, file paths, ethics). It is somewhat dense and long, but nearly every sentence earns its place.

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 multi-step async generation tool with nested required assets, the description covers the async lifecycle, result retrieval, cost, file-path sourcing, and policy constraints. Although an output schema exists, the extra retrieval guidance for an async job is genuinely necessary and present.

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%, so the schema already documents all three parameters including the file-path format and max_resolution clamping. The description's note that max_resolution can be set below the plan maximum largely restates the schema's clamping note. Baseline 3 applies when the schema does the heavy lifting.

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 opening line states a specific verb and resource: 'Swap a head onto a body image.' An agent instantly knows the transformation performed. It falls short of a 5 because it does not differentiate itself from close siblings like body_swap_create_image or face_swap_photo_create_image, which an agent selecting between image-swap tools would need.

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?

The MCP guidance gives clear operational context: this is an async job, how to retrieve results via wait_for_image_project or polling, and how to supply file paths. The ethical constraints ('own likeness or authorized content') add usage boundaries. It lacks explicit when-to-use-this-vs-sibling guidance for the other swap tools.

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