Glyphs mcp scripting

From thierryc/Glyphs-mcp · View interactive version

Glyphs mcp scripting is an AI agent skill from the GitHub repository thierryc/Glyphs-mcp. Use this skill to vibe-code, preview, run, or debug focused Python scripts inside the live Glyphs app through Glyphs MCP, including Macro Panel snippets and experiments that may later become reusable scripts or plug-ins. Ground unfamiliar GlyphsApp APIs in the bundled documentation and gate every mu

How to use this skill

Skill file

Glyphs MCP scripting

Turn a natural-language idea into the smallest verifiable Python script for the

running Glyphs app.

Core rules

the task. Keep outline-specific fallback code in glyphs-mcp-outlines-docs

and guarded italic fallback code in glyphs-mcp-italic-first-pass.

for the request before writing code.

before using an unfamiliar GlyphsApp API. Target Glyphs 3.5 and Glyphs 4

unless the user requests one version.

execute_code only when injected font, glyph, and layer context is not useful.

practical, and bound returned output with max_output_chars and

max_error_chars.

scripts or plug-ins, restart Glyphs, save a font, access files or the network,

or launch subprocesses without separate explicit authorization.

dedicated MCP tools and optionally inspect get_document_change_overview.

Workflow

  1. Form a compact brief from the request:
  1. Resolve missing live context with get_server_info, list_open_fonts,

get_selected_font_and_master, and the smallest relevant selection or

inspection tools. Ask only when a consequential target or scope remains

ambiguous.

  1. Search and fetch the focused API documentation needed for the script.
  2. Write the smallest working vertical slice. Validate object existence before

reading or changing it, and summarize outcomes as changed, skipped, and

failed counts when processing a batch.

  1. Classify the exact code before execution:

inspect the bounded result.

execution tool with snippet_only=true. Show the exact code, targets, and

expected changes, then stop for explicit approval.

  1. Treat the submitted code argument as the reviewed executable. Label the

returned Macro Panel snippet separately because it wraps that code for manual

use. Bind approval to the exact execution tool, code, font/glyph context,

remaining arguments, targets, and side-effect scope.

  1. After approval, execute only that unchanged reviewed request. If any bound

field changes, generate a new snippet and request approval again.

  1. For larger layer edits, pair layer.beginChanges() and

layer.endChanges() in try/finally. Avoid MCP-driven

glyph.beginUndo()/glyph.endUndo() because live Glyphs 4 testing found

that those groups can trigger the undo recovery dialog.

  1. Re-read the affected state, compare it with the brief's success condition,

and report what ran, what changed, what was skipped, errors, and whether the

font remains unsaved.

  1. On a traceback, reduce to a minimal reproducer and retry once. Stop after a

repeated failure and report any state that may already have changed.

Reusable artifacts

When the result should become a Script-menu command or a plug-in, route to

glyphs-mcp-development. Create the reusable .py file or plug-in bundle in

the workspace, retain # MenuTitle and __doc__ for scripts, validate it

statically, and leave live installation or runtime testing as a separate

request.

Deeper references

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.