execute_in_glyphs
Run Python code inside GlyphsApp to access the Glyphs API, execute scripts, and retrieve stdout output.
Instructions
Execute arbitrary Python code inside GlyphsApp.
The code runs with access to the Glyphs object and all GlyphsApp API. stdout is captured and returned. This is powerful but must be used carefully.
NOTE: This endpoint is disabled by default. The user must enable it in GlyphsApp preferences (com.nico.glyphs-mcp.allowExecute = True).
RECIPE: Do not improvise multi-step work here. To create a Glyphs plugin or script, follow get_recipe("create_glyphs_plugin") or get_recipe("create_glyphs_script"). For bulk layer cleanup, follow get_recipe("cleanup_dated_layers").
Example: execute_in_glyphs("print(Glyphs.font.familyName)")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |