Skip to main content
Glama
nmassi

glyphs-mcp

by nmassi

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

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It states that code runs with access to the Glyphs object and GlyphsApp API, that stdout is captured and returned, and that the endpoint is powerful and disabled by default. It does not detail potential destructive side effects or error behavior, but for an arbitrary code execution tool the provided warnings and execution model are reasonably transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and then adds essential context in a logical order: execution context, output behavior, warning, enablement requirement, recipe guardrails, and example. Every sentence earns its place without padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and absence of annotations/output schema, the description covers the key operational facts: what code runs against, what output is returned, the security gate, and which workflows should instead use recipes. It could mention error handling or the absence of a sandbox more explicitly, but the essentials for invoking the tool correctly are present.

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?

The schema provides only a title 'Code' with no description (0% coverage), so the description must compensate. The description explains that the parameter is Python code executed in GlyphsApp and gives a concrete example: execute_in_glyphs('print(Glyphs.font.familyName)'). This adds enough semantic meaning for an agent to construct a valid call.

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 and resource: 'Execute arbitrary Python code inside GlyphsApp.' It clearly distinguishes this from the named sibling tools by establishing it as a raw code-execution endpoint rather than a specific glyph operation. The example reinforces the purpose.

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

Usage Guidelines4/5

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

The description explicitly warns against improvising multi-step work and points to get_recipe calls for plugin/script creation and bulk cleanup, which is a clear when-not-to-use exclusion. It also notes the endpoint is disabled by default and must be enabled, giving essential prerequisite context. It could be stronger with an explicit 'use this when...' statement, but the guidance is sufficient.

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