Skip to main content
Glama

Generate headshot

generate_headshot

Creates a headshot from a supplied photo containing one detectable face, with optional appearance instructions. Costs 50 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. A listed model, resolution, duration or count is not necessarily available together or on this account. Preserve explicit requirements and all supplied inputs; explain a genuine block instead of submitting an incompatible request. Account balance alone does not prove a request is affordable. For attached ChatGPT files, upload with upload_chatgpt_media and pass its returned file_path. Reuse existing Magic Hour paths only from the connected account. Do not pass a filename, chat-local path or file ID as a file path.

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": {
      "assets": "<assets>"
    },
    "name": "generate_headshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoOptional project name for identifying this output. Omit to use the API's default project name.Ai Headshot - dateTime
styleNoOptional headshot appearance instructions. Omit the prompt for the API's default style.
assetsYesProvide the assets for headshot photo

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. Changed2 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Give your image a custom name for easy identification."New value: +"Optional project name for identifying this output. Omit to use the API's default project name."
    • addedInput schema / properties / style / description
      Added value: +"Optional headshot appearance instructions. Omit the prompt for the API's default style."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare non-read-only, non-idempotent, open-world. The description adds material facts annotations cannot: a fixed 50-credit cost, asynchronous execution returning a project id, per-account model/resolution availability caveats, that balance alone does not prove affordability, and that only connected-account paths are reusable.

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, cost, and async behavior are front-loaded, which is the right ordering. It is dense and mostly justified, but the mid-block sentences about preserving explicit requirements and explaining blocks read as generic policy rather than tool-specific facts and could be tightened.

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 three-parameter generation tool with a nested assets object and an output schema, the description covers everything needed to call it correctly: input file sourcing rules, cost, async handoff, availability uncertainty, and account constraints. No behavioral gap remains that would cause a wrong invocation.

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 coverage is 100%, so the baseline is 3; the description still earns above that by constraining image_file_path (no filename, chat-local path, or file ID; only connected-account Magic Hour paths) and by stating the one-face requirement that gates the assets input. It does not add syntax detail for name or style.prompt beyond the schema's own guidance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource ('Creates a headshot') plus the key input constraint ('photo containing one detectable face') and the optional customization. An agent can tell this apart from edit_face_in_photo or generate_image without opening the schema.

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

Usage Guidelines5/5

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

It gives explicit prerequisites and routing: read get_account_info and current parameter constraints before choosing settings, upload attached files via upload_chatgpt_media and pass the returned file_path, and hand the resulting project id to wait_for_image_project. It also states a fallback behavior (explain a genuine block rather than submit an incompatible request).

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