Skip to main content
Glama

photoshop_set_text_ranges

Apply mixed fonts, sizes, and colors to defined character spans within a single text layer. Use when one layer needs multiple styles instead of separate layers.

Instructions

Apply mixed fonts, sizes, and colors inside a single text layer (Action Manager textStyleRange).

Users often say: mixed type, two fonts in one line, multicolor text, 混排, 同一文字层.

Use when: one layer must contain more than one font or color. from is inclusive, to is exclusive (JavaScript slice / ExtendScript string indexes). Do NOT use when: the whole layer shares one style — use photoshop_set_text_style. Do NOT split into extra layers for mixed type unless this tool errors.

Returns: JSON { ok, summary, details: { style, ranges } }. Preconditions: active text layer. Unspecified gaps keep the layer default style. Side effects: rewrites character styles; restores tracking/leading/box afterward.

Input Schema

NameRequiredDescriptionDefault
rangesYesNon-overlapping character spans (from inclusive, to exclusive)
document_idNoOptional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does: it declares the precondition (active text layer), the destructive side effect (rewrites character styles), and the mitigation (tracking/leading/box restored afterward). It also discloses the fallback behavior for unspecified spans and the index convention, which are not derivable from annotations.

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 core action, then cleanly sectioned into use/do-not-use, return shape, preconditions and side effects — every labeled clause earns its place. The 'Users often say' synonym list (including 混排) is slightly padding-like but aids retrieval, so only a minor deduction.

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?

No output schema exists, yet the description supplies the return shape (ok, summary, details.style/ranges), preconditions, side effects, and the error-adjacent guidance about not splitting layers. For a two-parameter mutation tool this is everything an agent needs to call it correctly.

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 adds genuine meaning by stating that unspecified gaps keep the layer default style and by restating the inclusive/exclusive index convention that governs every span. It does not discuss the 64-span cap or non-overlap constraint, which live only in the schema.

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?

States a specific verb and resource — apply mixed fonts, sizes and colors inside a single text layer — and names the underlying mechanism (Action Manager textStyleRange). It explicitly contrasts itself with the sibling photoshop_set_text_style, so an agent can distinguish the two 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?

Provides an explicit 'Use when' condition (one layer must contain more than one font or color) and a 'Do NOT use when' exclusion that routes to photoshop_set_text_style by name. It also pre-empts a likely wrong workaround: do not split into extra layers unless this tool errors.

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