photoshop_create_text_layer
Create a Photoshop text layer with content, position, font, size, color, tracking, leading, alignment, or paragraph box. Use for adding titles, labels, or typography to a design.
Instructions
Create a text layer with content, position, font, and optional typography (tracking, leading, paragraph box, alignment, color).
Users often say: add title, letter spacing, line height, text box, 字间距, 行高, 排版.
Use when: adding labels, titles, or typography to the design. Do NOT use when: editing existing text — use photoshop_update_text_content / photoshop_set_text_style. Do NOT use execute_script for tracking/leading/box — pass those fields here.
Returns: JSON { ok, summary, details: { layerName, text, style, context } }. Use photoshop_list_fonts to discover font names; photoshop_set_text_font / photoshop_set_text_style to change later. Preconditions: active document. Side effects: adds text layer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position in pixels (default: 100) | |
| y | No | Y position in pixels (default: 100) | |
| red | No | Text color red 0–255 | |
| blue | No | Text color blue 0–255 | |
| kind | No | point = single-line; paragraph = wrapped text box (default point unless box_width/height set) | |
| text | Yes | Text content | |
| green | No | Text color green 0–255 | |
| leading | No | Line height in points. Sets auto_leading false. | |
| fontName | No | Optional font display or PostScript name (resolved via app.fonts; see photoshop_list_fonts) | |
| fontSize | No | Font size in points (default: 24) | |
| tracking | No | Character spacing in 1/1000 em (−1000 to 10000). Photoshop tracking. | |
| alignment | No | Paragraph/point justification | |
| box_width | No | Paragraph text box width in pixels (implies kind=paragraph) | |
| box_height | No | Paragraph text box height in pixels (implies kind=paragraph) | |
| document_id | Yes | 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. | |
| auto_leading | No | Use Photoshop auto leading (ignores leading when true) |