Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
xNoX position in pixels (default: 100)
yNoY position in pixels (default: 100)
redNoText color red 0–255
blueNoText color blue 0–255
kindNopoint = single-line; paragraph = wrapped text box (default point unless box_width/height set)
textYesText content
greenNoText color green 0–255
leadingNoLine height in points. Sets auto_leading false.
fontNameNoOptional font display or PostScript name (resolved via app.fonts; see photoshop_list_fonts)
fontSizeNoFont size in points (default: 24)
trackingNoCharacter spacing in 1/1000 em (−1000 to 10000). Photoshop tracking.
alignmentNoParagraph/point justification
box_widthNoParagraph text box width in pixels (implies kind=paragraph)
box_heightNoParagraph text 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 (ignores leading when true)

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"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "text"
      -]New value: +[
      +  "text",
      +  "document_id"
      +]
  3. Changed10 schema fields changedv1.7.20
    • addedInput schema / properties / alignment
      Added value: +{
      +  "description": "Paragraph/point justification",
      +  "enum": [
      +    "LEFT",
      +    "CENTER",
      +    "RIGHT",
      +    "LEFTJUSTIFIED",
      +    "CENTERJUSTIFIED",
      +    "RIGHTJUSTIFIED",
      +    "FULLYJUSTIFIED"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / auto_leading
      Added value: +{
      +  "description": "Use Photoshop auto leading (ignores leading when true)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / blue
      Added value: +{
      +  "description": "Text color blue 0–255",
      +  "maximum": 255,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / box_height
      Added value: +{
      +  "description": "Paragraph text box height in pixels (implies kind=paragraph)",
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / box_width
      Added value: +{
      +  "description": "Paragraph text box width in pixels (implies kind=paragraph)",
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / green
      Added value: +{
      +  "description": "Text color green 0–255",
      +  "maximum": 255,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / kind
      Added value: +{
      +  "description": "point = single-line; paragraph = wrapped text box (default point unless box_width/height set)",
      +  "enum": [
      +    "point",
      +    "paragraph"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / leading
      Added value: +{
      +  "description": "Line height in points. Sets auto_leading false.",
      +  "minimum": 0.1,
      +  "type": "number"
      +}
    • addedInput schema / properties / red
      Added value: +{
      +  "description": "Text color red 0–255",
      +  "maximum": 255,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / tracking
      Added value: +{
      +  "description": "Character spacing in 1/1000 em (−1000 to 10000). Photoshop tracking.",
      +  "type": "number"
      +}
  4. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the safety profile (not readOnly, not destructive, not idempotent), so the description builds on that by disclosing preconditions (active document) and side effects (adds a text layer) plus a return shape. It stops short of richer behavioral detail such as how the layer is named or how conflicts with the active document selection are handled, but the added context is solid.

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 purpose, then layered with user-phrase synonyms, when/when-not rules, return shape, related tools, and pre/post conditions. Dense but every block is functional; only the synonym line ('Users often say…') is slightly filler, keeping it just under the top mark.

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 16-parameter mutation tool with no output schema, the description supplies the missing pieces: an explicit return shape (JSON { ok, summary, details }), a precondition, side effects, and pointers to sibling tools for fonts and later edits. Nothing an agent needs to call 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 description coverage is 100%, so the baseline is 3, but the description adds value beyond the schema: font resolution is routed through app.fonts via photoshop_list_fonts, and it flags that tracking/leading/box should be passed here rather than scripted. These are semantic aids the schema alone does not supply.

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+resource (create a text layer) and enumerates the domain fields it controls: content, position, font, and optional typography (tracking, leading, paragraph box, alignment, color). The agent can distinguish this from photoshop_create_layer and the various text-editing siblings without opening a 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' (labels, titles, typography) and 'Do NOT use when' clauses that name the exact alternatives (photoshop_update_text_content / photoshop_set_text_style) for editing existing text. It further warns against routing tracking/leading/box through execute_script, closing off a plausible 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