Skip to main content
Glama

Set custom font

set_custom_font
Destructive

Register a typeface Morpha does NOT ship, so text layers can use it by family name via font_family (exactly like a built-in family). Families already in the built-in catalogs (anything list_fonts returns from google/bunny/fontshare/fontsource/velvetyne) are REJECTED — they need no registration; just set font_family to them directly. src is EITHER a full URL (https://…) OR a font file already uploaded to the project's asset bucket (create_upload_link, or POST /api/upload-asset/ with raw bytes + an X-Upload-Name header; .woff2/.woff/.ttf/.otf): pass the filename the upload returned. Like add_image_layer, this does NOT verify an uploaded filename exists. Dedupes by family+weight+style, replacing a matching face. After registering, set a text layer's font_family to this family (add_text_layer / set_layer_text). NOTE: a pasted URL only loads if that host sends permissive CORS headers — uploading the font (served same-origin) is the robust path. A URL is not fetched when this tool runs: Morpha's renderer and every browser that opens the project download it later. Reference: https://morphareels.ai/docs/tools#setcustomfontfamily-src-weight-style

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
srcYesA full font URL (https://…/font.woff2) OR an uploaded asset filename in the project's bucket.
styleNoOptional face style. Defaults to normal.
familyYesFamily name text layers will reference via font_family, e.g. "Mylius Modern".
weightNoOptional specific weight (1-1000) this src provides. Omit for the 400/normal baseline.
projectIdYesOpaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates.

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: -[
      -  "family",
      -  "src",
      -  "projectId",
      -  "anonymousToken"
      -]New value: +[
      +  "family",
      +  "src",
      +  "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. 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: -[
      -  "family",
      -  "src",
      -  "projectId"
      -]New value: +[
      +  "family",
      +  "src",
      +  "projectId",
      +  "anonymousToken"
      +]
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description goes well beyond: it explains that it does NOT verify uploaded filenames, dedupes by family+weight+style, replaces matching faces, does not fetch URLs at call time (deferred to renderer/browser), and requires permissive CORS for URLs. This is rich behavioral disclosure that the annotations alone couldn't provide.

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 dense but well-organized, front-loading the core purpose and rejection rule, then flowing through src options, behavioral caveats, and usage steps. It's longer than a typical description but every sentence adds essential information; the reference link at the end is a bonus. It could be tightened slightly but the length is justified by the complexity.

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?

Complete for a tool with this complexity. Covers what it registers, how to use it afterward, the src format variants, upload specifics, CORS caveat, dedupe behavior, and a documentation reference. The output schema exists (likely returns the registered family info) so return values need not be described. 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 coverage is 100% so parameters are already documented. The description adds crucial semantics beyond the schema: for src it explains the two valid forms (full URL or uploaded asset filename) and the exact format of the upload endpoint; it clarifies weight/style defaults and the dedupe key. It doesn't repeat the schema but adds contextual meaning to each parameter's role in the registration process.

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 clearly states the tool's purpose: registering a typeface not shipped by Morpha so text layers can reference it via font_family. It names the resource (custom font family), the action (register), and distinguishes it from the sibling list_fonts and the direct approach of using a built-in family.

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?

Explicitly states when to use (fonts not in built-in catalogs) and when not to (built-in families are rejected and should just be set directly). It also provides the workflow: register then set font_family via add_text_layer/set_layer_text. Provides alternative upload path and why it's robust.

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