Skip to main content
Glama

Add text layer

add_text_layer

Create a new text layer — a first-class leaf that animates, groups, and z-orders exactly like an image or shape. The renderer draws live typeset text (multi-line, auto-fit to the box). Defaults: x/y = canvas centre, width 900, height 320, font_family "Hanken Grotesk", text_size derived from existing text layers (or ~10% of canvas height). Also accepts full type styling: font_weight (100-900), font_style (italic), text_transform, letter_spacing, line_height, text_align, text_autofit ("hug" default = box shrink-wraps the text at the fixed text_size, honouring literal newlines, so it can't re-wrap between preview and export — bake your own "\n" line breaks / "wrap"=fixed size + word-wrap to the box / "fit"=auto-size to fill the box, grows and shrinks / "shrink"=legacy shrink-only), text_valign (top/middle/bottom), an outline (stroke_width + stroke_color), and text_shadow. Returns the new layer's id + element id (text.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoCentre x in canvas px. Defaults to canvas centre.
yNoCentre y in canvas px. Defaults to canvas centre.
textNoThe text to render. Newlines are honoured as hard line breaks.
blockNoOPTIONAL timeline window — {start, duration} in composition frames. OMIT IT (the default) and the layer is ALWAYS PRESENT: a persistent overlay that holds for the whole composition, which is what an agent-placed watermark / lower-third almost always wants. Pass it to place a bounded CLIP instead (what the editor's own add does: 5 s at the playhead). Keyframes on a blocked layer are sampled RELATIVE to `start`.
curveNoCurve the text onto an arc, in degrees of total sweep. 0 = straight (default). POSITIVE = a SMILE (⌣, ends rise); NEGATIVE = an ARCH (⌒, rainbow). Clamped ±135. A tasteful smile is ~+60. Single line only (multi-line is joined while curved).
widthNoBox width in px (> 0). Default 900.
heightNoBox height in px (> 0). Default 320.
projectIdYesOpaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates.
text_sizeNoFont size in px. Omit to derive from existing text layers (median) or the canvas height.
font_styleNoItalic toggle. Default normal.
text_alignNoHorizontal alignment of each line. Default center.
text_colorNoText fill colour as #rrggbb. Defaults to white.
decorationsNoPer-character underline / strikethrough. { underline?: [{start,end}], strikethrough?: [{start,end}] } — half-open character ranges [start,end) (UTF-16 offsets) into `text`. E.g. underline the first word of "Big news": underline:[{start:0,end:3}]. Ranges are normalized (sorted + merged). Not rendered on curved text.
font_familyNoGoogle Fonts family name, e.g. "Anton". Defaults to "Hanken Grotesk".
font_weightNoFont weight 100..900 (400 regular, 700 bold, 800 black). Default 400.
line_heightNoLine height as a multiple of font size (1.2 = 120%).
text_shadowNoDrop shadow { offsetX, offsetY, blur, color }; color is any CSS colour (rgba allowed). null clears it.
text_valignNoVertical alignment of the text block within its box. "middle" (default) centres it; "bottom" pins it to the box floor so extra wrapped lines grow upward from a fixed baseline (captions use this so a wrapped line doesn't shift the others); "top" pins the ceiling.
stroke_colorNoOutline colour as #rrggbb. Defaults to white when a width is set.
stroke_widthNoOutline width in px (0 = no outline).
text_autofitNoHow text fits its box. "hug" (default for new layers): hold text_size FIXED and DERIVE the box from the measured text plus padding, honouring the literal newlines you pass — the box shrink-wraps the exact content and grows/shrinks live as the text changes, so it can never re-wrap differently between the editor preview and the export (bake your own "\n" breaks; pair with set_text_background for a rounded caption box). "wrap": hold text_size FIXED in a fixed-size box and only word-wrap (hard-breaking a single over-wide word), never resize. "fit": ignore text_size and auto-size the font BOTH ways (grow and shrink) to the largest size whose wrapped block fills the box — resizing the box resizes the text. "shrink" (legacy): word-wrap then auto-shrink the font from text_size until the block fits; never grows.
letter_spacingNoTracking between glyphs in px; may be negative. Default 0.
text_transformNoCase transform applied before layout. Default none.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the call succeeded.
dataNoThe payload, shaped by the tool.
noteNoWhat to do next when not ready.
errorNoWhy it failed.
statusNoFor cache-backed readers: whether the answer was ready.
editorUrlNoOpens this project in the editor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / anonymousToken
      Removed value: -{
      -  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "projectId",
      -  "anonymousToken"
      -]New value: +[
      +  "projectId"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The result envelope every Morpha tool returns.",
      +  "properties": {
      +    "data": {
      +      "description": "The payload, shaped by the tool.",
      +      "type": [
      +        "object",
      +        "array",
      +        "string",
      +        "number",
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "editorUrl": {
      +      "description": "Opens this project in the editor.",
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Why it failed.",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "What to do next when not ready.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "Whether the call succeeded.",
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "description": "For cache-backed readers: whether the answer was ready.",
      +      "enum": [
      +        "ready",
      +        "not-ready"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / font_family / description
      Previous value: -"Google Fonts family name, e.g. \"Anton\". Default \"Anton\"."New value: +"Google Fonts family name, e.g. \"Anton\". Defaults to \"Hanken Grotesk\"."
  4. Changed2 schema fields changed
    • addedInput schema / properties / anonymousToken
      Added value: +{
      +  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "projectId"
      -]New value: +[
      +  "projectId",
      +  "anonymousToken"
      +]
  5. First observed

TDQS

A4.2/5.0
Behavior5/5

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

With only readOnlyHint=false and destructiveHint=false in annotations, the description carries the full burden and delivers extensively. It discloses creation semantics, default values, the autofit modes' precise behavior (including the guarantee that 'hug' prevents re-wrapping between preview and export), curve direction conventions, and the return value. It even explains the legacy 'shrink' mode. Nothing is left opaque.

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?

The description is long but every sentence earns its place given the 23 parameters and complex behaviors. It front-loads the core purpose and then covers defaults, styling, autofit modes, and return value in a logical order. It is dense but not redundant; minor verbosity in the autofit explanation is justified by its importance.

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 tool with 23 parameters, nested objects, an output schema, and rich sibling interactions, the description is comprehensive. It covers defaults, behavioral nuances, return value, and critical caveats (e.g., curve only works on single lines). An agent can confidently invoke this tool without needing to consult other documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter already has an explanation in the schema. The description adds some nuance (e.g., explaining the rationale for hug mode and pairing with set_text_background), but it largely repeats the schema's parameter details. It does not significantly compensate beyond what the schema provides, so the baseline 3 is appropriate.

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?

The description opens with a specific verb-resource pair ('Create a new text layer') and immediately qualifies it as a 'first-class leaf that animates, groups, and z-orders exactly like an image or shape,' which clearly separates it from siblings like add_caption_track or set_layer_text. It also enumerates the full styling surface, so an agent knows exactly what this tool is for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool does and hints at usage contexts (e.g., 'what an agent-placed watermark / lower-third almost always wants' in the block parameter), but it never explicitly contrasts it with alternatives or says when not to use it. There is no 'use add_caption_track instead' type guidance, so the when-vs-other-tools decision is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources