Skip to main content
Glama
shinjiyu

figma-meta-mcp

by shinjiyu

figma_exec

Run JavaScript in the Figma plugin main thread to inspect and manipulate the live document, using the Figma API, and return JSON-serializable data without hitting REST API rate limits.

Instructions

Execute JavaScript inside the running Figma plugin main thread (like ae_exec / cocosmcp_exec / Blender execute_blender_code). The code runs with access to the global figma Plugin API. Write an async body; the final expression / return value is JSON-serialized back. Prefer plain data (id/name/type/x/y/width/height). Avoid returning live node proxies. Example: return figma.currentPage.selection.map(n => ({ id: n.id, name: n.name, type: n.type }));

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPlugin-main JavaScript body. Can use await. Return JSON-serializable data.
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the execution context (main thread, global figma API), async support, JSON serialization of return values, and warns against returning live node proxies. This is valuable behavioral context beyond just 'execute code', though it omits error handling or timeout behavior.

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 compact and well-structured, front-loading the core purpose and then providing essential details, warnings, and an illustrative example. Every sentence earns its place without redundancy.

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 generic code execution tool, the description covers the essential aspects: execution environment, API access, async body, return serialization, and data handling guidance. It lacks explicit error handling or side-effect caveats, but these are not critical for a straightforward exec tool, and the example makes it actionable.

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 covers the single 'code' parameter with a description, and the tool description adds more: async body, JSON-serializable return, and an example. This enriches the parameter meaning beyond the schema, so a 4 is appropriate despite high schema coverage.

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 function: 'Execute JavaScript inside the running Figma plugin main thread.' It uses a specific verb and resource, and the analogy to ae_exec/cocosmcp_exec differentiates it from the sibling tools (figma_health, figma_selection_info), which are specialized for health checks and selection info.

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 makes the usage context clear: it's for running arbitrary JavaScript with access to the Figma plugin API. It implies this tool is for custom logic beyond the simpler sibling tools, but it does not explicitly state when not to use it or name alternatives directly. The example with selection shows a typical use case.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shinjiyu/figma_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server