Skip to main content
Glama

设置角色场景道具形象主图

pavo_script_set_asset_main_image
Idempotent

Set an uploaded HTTPS image as the main image for a character, scene, or prop state; validate the state fingerprint and pixel dimensions, then save and verify the asset version without generation.

Instructions

将已上传的HTTPS图片设为指定状态的形象主图main_image。asset_type为character/scene/prop;须传get_assets对应states指纹与真实像素宽高,比例自动计算,thumbnail_url省略时使用原图。核归属、只读、同名状态歧义及UNKNOWN,按官网art-versions(sync_to_entity=true)保存版本并回读主图;不会触发生成。参考图使用save_asset_state;设置形象图片使用本工具。官网无CAS,避免同时在网页编辑同一状态。

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": {
      "project_id": "<project_id>",
      "asset_type": "<asset_type>",
      "asset_id": "<asset_id>",
      "state_id": "<state_id>",
      "image_url": "<image_url>",
      "width": "<width>",
      "height": "<height>",
      "expected_sha256": "<expected_sha256>",
      "operation_id": "<operation_id>"
    },
    "name": "pavo_script_set_asset_main_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthYes
heightYes
asset_idYes
state_idYes
image_urlYes
asset_typeYes
project_idYes
operation_idYes
thumbnail_urlNo
expected_sha256Yes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare a non-destructive, idempotent, open-world write, and the description adds real context beyond that: no generation is triggered, an ownership check runs, versions are saved per the site's art-versions with sync_to_entity=true and the main image is read back, plus named edge cases (read-only, duplicate state name ambiguity, UNKNOWN). The only gap is that it never explains the idempotency/operation_id relationship declared in the annotations, and the edge-case clause is telegraphic enough to be partly opaque.

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?

Front-loaded with the action and asset_type domain, then constraints, then alternatives — good ordering with no filler sentences. It is written as a dense run-on with semicolons, and the clause '核归属、只读、同名状态歧义及UNKNOWN' compresses several distinct failure conditions into a list that is hard to parse on first read.

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 a 10-parameter mutation with an output schema (so return values need not be described), it covers prerequisites, side effects, version-save semantics, alternatives and a concurrency warning. What remains missing is documentation of the identity/hash/idempotency parameters (expected_sha256, operation_id), which an agent must still guess at.

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 0% across 10 bare-titled parameters, so the description must carry the load. It does explain asset_type values, that state_id must come from get_assets, that width/height are true pixel dimensions with the ratio auto-computed, that image_url must be a pre-uploaded HTTPS URL, and that thumbnail_url falls back to the original — but project_id, asset_id, expected_sha256 and operation_id are left entirely undefined, which is a substantial remaining gap.

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?

Opens with a specific verb+resource: set an already-uploaded HTTPS image as the main_image of a specified asset state. It enumerates the asset_type domain (character/scene/prop) and explicitly distinguishes itself from pavo_script_save_asset_state ('reference images use save_asset_state; setting the main image uses this tool'), so an agent can route between the two siblings without opening either 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?

Gives prerequisites (state_id must be the states fingerprint returned by pavo_script_get_assets), the alternative tool for the adjacent use case, and an explicit operational exclusion (do not edit the same state in the web UI concurrently, since there is no CAS). Both when-to-use and when-not-to-use are present.

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