Skip to main content
Glama

photoshop_set_text_style

Set layer-wide typography on the active text layer—tracking, leading, point/paragraph box, alignment, font, size, and color—in one undo-friendly call.

Instructions

Set layer-wide typography on the active text layer: tracking, leading, point vs paragraph box, alignment, font, size, color.

Users often say: letter spacing, tracking, line height, leading, text box width, paragraph text, 字间距, 行高, 文本框.

Use when: tightening/loosening type, setting line height, converting to a wrapped paragraph box, or batching several text attributes in one undo-friendly call. Do NOT use when: creating a new layer — pass the same fields on photoshop_create_text_layer. Do NOT use when: mixed fonts/colors inside one layer — use photoshop_set_text_ranges. Do NOT use execute_script for tracking/leading/box.

Returns: JSON { ok, summary, details: { style } }. Preconditions: active text layer. Side effects: mutates TextItem attributes.

Input Schema

NameRequiredDescriptionDefault
redNoRed 0–255
blueNoBlue 0–255
kindNopoint or paragraph (wrapped) text
greenNoGreen 0–255
leadingNoLine height in points. Sets auto_leading false.
fontNameNoFont PostScript name (preferred) or display name
fontSizeNoSize in points
trackingNoCharacter spacing in 1/1000 em (−1000 to 10000)
alignmentNoJustification (same enum as photoshop_set_text_alignment)
box_widthNoParagraph box width in pixels (implies kind=paragraph)
box_heightNoParagraph box height in pixels (implies kind=paragraph)
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.
auto_leadingNoUse Photoshop auto leading

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it names the precondition (active text layer), the side effect (mutates TextItem attributes), and the undo-friendly batching behavior, plus the return envelope. It stops short of stating failure modes, e.g. what happens when no text layer is active or when fontName is unavailable, but the safety-relevant facts are present.

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 capability statement, then clearly segmented into invocation phrases, When/Do NOT rules, return shape, and preconditions. Every block is functional; the only minor excess is the multilingual keyword line, which is bulkier than the rest but still serves intent matching.

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 13-parameter, all-optional mutation tool with no annotations and no output schema, the description supplies everything an agent needs: targeting, preconditions, side effects, return shape, sibling routing, and batching semantics. Nothing required to invoke it correctly is missing.

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 baseline would be 3; the description earns above that by mapping user vocabulary onto parameter names (letter spacing / 字间距 → tracking, line height / 行高 → leading, text box width / 文本框 → box_width/kind). That synonym mapping is real disambiguation value the schema does not provide, though it does not address the color triplet or document_id retargeting behavior.

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 ("Set layer-wide typography on the active text layer") and enumerates the exact attributes covered: tracking, leading, box type, alignment, font, size, color. It explicitly carves itself out from photoshop_create_text_layer, photoshop_set_text_ranges, and the granular set_text_font/color/alignment siblings, so an agent can discriminate it without opening any 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 explicit positive triggers (tightening type, setting line height, converting to paragraph box, batching attributes in one undo-friendly call) and two explicit negative triggers with named alternatives (create_text_layer for new layers, set_text_ranges for mixed fonts/colors). It also rules out ps_execute_script for these operations, closing the most likely wrong path.

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