Skip to main content
Glama

set_character_portrait

Set a character's portrait with your own image to anchor identity, overriding AI defaults and rebuilding face lock and derived assets.

Instructions

用客户自有图片作为角色定妆图(身份锚,优先级高于 AI 生成;之后 AI 重生默认不覆盖)。换图会自动失效并重建派生资产(三视图设定图/发型·身材参考)、重建人脸锁。★换图后响应含 stale_frames=[{storyboard_id,storyboard_number,frames}]——这些镜的首帧还是旧定妆图生成的、已被污染。要让新定妆图生效:对每个 stale_frame 用 quote_shot_frame+generate_shot_frame 重生该镜(平台会自动以新定妆图/设定图/人脸锁作锚,保全片一致)。不必逐镜自己指定模型/首尾帧。★千万别自制首尾帧再 upload_shot_frame——外部图没有角色身份锚/画风锚,人物·服装·画风必漂,那才是废片根源(不是"杜绝废片")。传本地文件(file_path,自动上传 COS)或已托管的图片 URL(image_url),二选一。免费。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathNo本地定妆图路径(与 image_url 二选一;自动上传 COS)
image_urlNo已上传的定妆图 URL(与 file_path 二选一)
character_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.57

TDQS

A4.6/5.0
Behavior5/5

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

No annotations exist, so the description carries the full transparency burden. It discloses side effects: changing the portrait invalidates and rebuilds derived assets (three-view sheet, hairstyle/body reference), rebuilds the face lock, AI regeneration will not overwrite by default, and stale_frames in the response are contaminated. It even explains the failure mode of external images lacking identity/style anchors.

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?

The description is long but front-loaded with the core purpose, and the ★ markers and imperative warnings make the dense workflow guidance scannable. Minor redundancy exists: it repeats the schema's '二选一' rule and ends with '免费,' which does not add operational value.

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 mutation tool with no annotations and no output schema, this is unusually complete. It covers input selection, side effects, response contents (stale_frames), exact remediation steps, and an explicit anti-pattern to avoid. An agent can invoke the tool and correctly handle its aftermath without additional research.

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 coverage is 67%: file_path and image_url already have descriptions including the mutual-exclusion rule and COS auto-upload, and the description largely restates those. character_id has no schema description and the description does not explain its semantics beyond what the tool name implies. The description adds general context but does not meaningfully compensate for the missing parameter-level explanation.

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 description defines a specific operation: using a customer-supplied image as the character's portrait, explicitly calling it the identity anchor with higher priority than AI-generated portraits. This clearly differentiates it from portrait-generation sibling tools like generate_character_portraits, even without naming them directly.

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 concrete when-to-use context (customer's own image as portrait) and provides an explicit workflow after a portrait change: regenerate each stale_frame using quote_shot_frame + generate_shot_frame. It also gives a direct when-not instruction: never hand-craft first/last frames and call upload_shot_frame, because it causes character/style drift.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools