Skip to main content
Glama
MaxsBond

Figma Bridge MCP

by MaxsBond

figma_run_script

Execute arbitrary JavaScript in the Figma Plugin API context to read or modify the open file; large results are written to a file.

Instructions

Run arbitrary JavaScript in the plugin with the figma Plugin API global (top-level await, use return). Can read AND modify the open file. Large results are written to a file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesBody of an async function; `figma` is in scope

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.9/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 and does much of it: it discloses that the tool can read AND modify the open file (mutation), that top-level await is supported, that `return` supplies the result, and that large results are written to a file. It stops short of stating permission requirements, timeouts, or reversibility of file modifications.

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?

Three short, dense sentences with the core action front-loaded and zero filler; each clause conveys distinct information (API surface, language semantics, mutation scope, output handling).

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?

For a single-parameter tool with no output schema, the description covers the important gaps: what runs, what scope exists, mutation capability, and where large output goes. Error behavior and any execution limits are unaddressed but are not essential to invoking it correctly.

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% for the single `code` parameter, so baseline is 3; the description adds genuine meaning by explaining the code is an async function body with `figma` in scope and that `return` is the result mechanism, which shapes how the agent should author the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: run arbitrary JavaScript against the `figma` Plugin API global. This is clearly distinct in kind from the read-oriented siblings (figma_get_tree, figma_export_json), though the description never explicitly contrasts itself with them.

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?

Usage is only implied: 'run arbitrary JavaScript' suggests a general-purpose escape hatch for operations the structured siblings do not cover, but the description never states when to prefer this over figma_get_tree or figma_export_json, nor any precondition.

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