Skip to main content
Glama

studio_prepare_media

Generate replayable photo crops from a source image using focus, protected-subject, ratio, and background-token settings; returns SHA-based asset registration commands for atomic commits and undo.

Instructions

从原图按焦点/保护主体/比例/底色令牌生成可重放的摄影素材,返回带 SHA 的资源登记命令,不自动改画布。将 registerCommand 和图片节点修改原子提交,支持一起撤销。需要 Python Pillow。

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": {
      "sourcePath": "<sourcePath>",
      "crops": "<crops>"
    },
    "name": "studio_prepare_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
portNo
asyncNotrue在工程内持久记录并返回句柄;结果未知时按requestKey核对,不重做
cropsYes
creditNo
projectDirNo
requestKeyNo
sourcePathYes
baseRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.5

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description's added value is the atomicity guarantee, joint-undo support, and the 'no automatic canvas mutation' contract, plus the Pillow environment dependency. These are genuine behavioral traits not encoded in annotations. Gaps remain on failure modes, what files are written where, and whether repeated calls are idempotent.

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?

Three compact sentences, front-loaded with the generate-and-return behavior, then the atomic commit/undo contract, then the dependency. Every clause carries information; the only cost is that the compression makes some terms opaque to a non-expert reader.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, no-output-schema mutation tool, the description covers the core workflow, return artifact (SHA registration command) and the Pillow requirement. However, it omits the meaning of baseRevision for optimistic concurrency and of the url/port/credit/projectDir plumbing, which an agent needs to call this safely in a versioned project.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 11%, so the description must carry the parameter burden, and it only gestures at fx/fy (focus), protectedRegion (protected subject), w/h (ratio) and fadeToToken (background token) in single-word form. Nine parameters are present but url, port, credit, projectDir, requestKey and especially baseRevision (a concurrency/version token) get no explanation in either the description or the schema.

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 concrete verb+resource: generate replayable photographic assets from a source image using focus/protected-subject/ratio/background-token, returning a SHA-tagged registration command. It also distinguishes itself from canvas-mutating siblings by saying it does not auto-modify the canvas. The purpose is clear, though the dense Chinese phrasing of several modifiers makes it less immediately scannable.

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?

Implies usage via 'does not automatically modify the canvas' and 'atomically commits registerCommand with image node changes', which suggests a follow-up apply step, but no sibling (e.g. studio_apply_commands) is named and no when-not guidance is given. The Python Pillow prerequisite is a useful usage condition. Overall guidance is inferable rather than explicit.

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