Skip to main content
Glama

Head Swap

head_swap_create_image

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.

MCP guidance:

  • Starts an async image job; returns id and credits_charged. For finished results, call wait_for_image_project with that id or poll GET /v1/image-projects/{id} until complete, error, or canceled. Results include downloads; wait helpers add exact_download_urls. Preserve signed URLs and query parameters; never append expiration metadata.

  • For *_file_path, use an existing Magic Hour path or the upload-URL endpoint's file_path after uploading raw bytes to its presigned URL. Direct public media URLs may work if stable and fetchable as raw bytes; hotlinked URLs can fail. Prefer the upload-URL endpoint when unsure.

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.

Input 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

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?

With annotations covering only the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description carries and delivers the operational detail: async job semantics, the returned `id`/`credits_charged`, the terminal states, the 10-credit cost per image, plan-dependent resolution, clamping behavior, and the warning to preserve signed URL query parameters.

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?

Content is dense and front-loaded with the safety guardrail followed by the workflow block, and nearly every sentence earns its place. The main structural flaw is that the core purpose ('Swap a head onto a body image') is buried in the last line rather than leading the description.

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 3-parameter async image job with a nested `assets` object and an existing output schema, the description covers everything an agent needs: cost, resolution constraints, file-path sourcing, polling/waiting behavior, and URL handling caveats. An output schema exists, yet the extra return-value context is additive rather than redundant.

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 100%, so baseline is 3. The description adds real meaning beyond the schema: the per-image credit cost, that `max_resolution` may be set below the plan maximum, and cross-referencing of the `*_file_path` upload pattern. Some of the clamping text duplicates the schema, so it is not a full 5.

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 final sentence states a specific verb and resource: 'Swap a head onto a body image.' That is unambiguous about the operation. However, it does not differentiate from adjacent siblings like face_swap_photo_create_image or body_swap_create_image, leaving the agent to infer which swap variant applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives usage constraints ('only with the user's own likeness', 'do not use for impersonation/deception/sexual content/minors') and routes the agent to a lifecycle alternative (wait_for_image_project vs polling GET). But it offers no guidance on when to choose this tool over the many sibling image-generation tools, which is the harder selection decision.

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