Skip to main content
Glama

photoshop_set_text_style

Idempotent

Set typography on the active text layer: tracking, leading, alignment, font, size, and color. Convert between point and paragraph text or batch changes 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

TableJSON 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 display or PostScript 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_idYesPhotoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call.
auto_leadingNoUse Photoshop auto leading

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.33
    • changedInput schema / properties / document_id / description
      Previous value: -"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null to use the active document. A number activates that document before the tool runs."New value: +"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call."
  2. Changed4 schema fields changedv1.7.32
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / document_id / description
      Previous value: -"Optional 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."New value: +"Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null to use the active document. A number activates that document before the tool runs."
    • changedInput schema / properties / document_id / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • addedInput schema / required
      Added value: +[
      +  "document_id"
      +]
  3. Addedv1.7.20

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare non-readOnly, idempotent, non-destructive, so the mutation profile is partly covered; the description adds real value on top by stating the precondition (active text layer), the side effect (mutates TextItem attributes), the return payload shape, and that batching is undo-friendly. It does not describe failure/partial-application behavior when only some attributes are valid, which keeps it short of a 5.

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 its attribute list, then routing, then returns/preconditions. The synonym line is slightly redundant but earns its place for intent matching in multilingual prompts; a few clauses could be trimmed but nothing is padding.

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 mutation tool with no output schema, the description supplies the return shape, preconditions, side effects, and sibling routing, so an agent has everything needed to call it correctly and to know when not to.

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 meaning by mapping user-colloquial vocabulary to parameters ('letter spacing'/'字间距'→tracking, 'line height'/'行高'→leading, 'text box width'/'文本框'→box_width/kind), which helps an agent translate an ambiguous request into the right fields. It does not, however, clarify units or too-many-attribute precedence beyond what the schema already documents.

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 it controls (tracking, leading, point vs paragraph box, alignment, font, size, color). An agent can distinguish it from photoshop_set_text_font, photoshop_set_text_color, photoshop_set_text_alignment, and photoshop_set_text_ranges 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?

Explicit 'Use when' with concrete scenarios (tightening type, line height, converting to a paragraph box, batching attributes in one undo step) and two explicit 'Do NOT use when' exclusions naming the correct alternatives (photoshop_create_text_layer, photoshop_set_text_ranges) plus a negative routing away from execute_script. This is the strongest possible routing guidance.

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