Skip to main content
Glama

body_swap_create_image

Swap a person into a scene image using Nano Banana 2 Lite (640px/1k) or Nano Banana 2 (2k/4k). Credits depend on resolution (from 50 credits at 640px upward).

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoGive your image a custom name for easy identification.Body Swap - dateTime
assetsYesPerson image and scene image for body swap
contextNoExplain 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."
resolutionYesOutput resolution. Determines credits charged for the run.

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
    • 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"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does it well: it discloses the async job model, that id and credits_charged return immediately, credit scaling from resolution (50 at 640px upward), the terminal statuses, that downloads/expiration metadata come back on completion, and the hotlinked-URL failure caveat. It omits auth/permission requirements and any rate limits or error-handling specifics.

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 and cost model are front-loaded in the first sentence, followed by clearly grouped MCP guidance bullets. Every sentence is informative, though the polling/file-path advice is verbose enough to be tightened slightly.

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 an async generation tool with an output schema, no annotations, and a nested asset schema, the description covers the async lifecycle, how to retrieve results, and file-input pitfalls. Missing only auth/prerequisite context, which would be the last piece needed for fully self-sufficient invocation.

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%, including detailed file-path semantics for both nested assets, so the baseline is 3. The description adds value mainly for resolution by tying it to credit cost, but does not add syntax or meaning beyond what the schema already documents for assets/name/context.

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 and resource ('Swap a person into a scene image') plus the underlying models and resolution tiers, so an agent knows exactly what it produces. It stops short of explicitly contrasting with close siblings like head_swap_create_image or face_swap_photo_create_image, leaving differentiation to inference.

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?

Gives solid operational guidance (call wait_for_image_project or poll GET /v1/image-projects/{id} until complete/error/canceled, and prefer a presigned upload file_path when in doubt), but this is post-call workflow rather than when-to-choose-this-tool. Nothing tells the agent when to pick body swap over head_swap or face_swap_photo, so selection guidance is only 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.