Skip to main content
Glama

Create a code block (FigJam)

figma_create_code_block
Idempotent

A FigJam code block with syntax highlighting. language (case-insensitive): typescript, javascript, python, go, rust, ruby, css, html, json, graphql, sql, swift, kotlin, cpp, bash, plaintext, dart — dart is in the Plugin API but not yet…

Instructions

A FigJam code block with syntax highlighting. language (case-insensitive): typescript, javascript, python, go, rust, ruby, css, html, json, graphql, sql, swift, kotlin, cpp, bash, plaintext, dart — dart is in the Plugin API but not yet confirmed on the canvas. Default plaintext; any other value is refused rather than shown as plain text, so ask for plaintext yourself. FigJam styles it: no theme, font or size to set. Editors: FigJam only, unverified.

Input Schema

NameRequiredDescriptionDefault
xNoLeft edge, in the parent's coordinates. Default: below what the parent holds; on the page, right of its content.
yNoTop edge, in the parent's coordinates.
codeYesThe code.
nameNoLayer name.
forceNoOverwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.
sessionNoOptional sessionId or file name, to pick a Figma file when more than one is connected.
languageNotypescript, javascript, python, go, rust, ruby, css, html, json, graphql, sql, swift, kotlin, cpp, bash, plaintext, dart. Default plaintext.
parentIdNoA section or frame to put it in (id or Figma link). Default: the current page.
idempotencyKeyNoCaller-owned retry key, ≤128 chars. Re-calling with the same key never executes twice: it returns the existing result, or waits for the op still in flight. Supply your own for anything large — if the MCP client times out (rather than the bridge), only a key you chose can be used to retry safely.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force
      Added value: +{
      +  "description": "Overwrite on purpose. A write to a node someone changed after you last read it is refused (STALE); read it again and resend instead. Pass true only when the person said to overwrite their edit.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

Adds real context beyond the annotations: unknown language values are refused rather than falling back to plain text, FigJam controls styling so there is no theme/font/size to set, and the editor support is flagged unverified. It does not restate the mutation/staleness behavior that the schema's `force` parameter already documents.

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

Conciseness4/5

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

Front-loads the one-line purpose and keeps the constraints tight, but the full 17-item language enumeration largely duplicates the schema's description and clutters an otherwise efficient paragraph.

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 9-parameter creation tool with no output schema, the description covers what the agent most needs (editor scope, language handling, styling limits); placement, retry and staleness parameters are fully explained in the schema, so nothing critical is missing.

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% so the baseline is 3; the description earns a bump by explaining the refusal semantics behind `language` (invalid values rejected, not rendered as plaintext) which the schema's flat value list does not convey.

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?

Opens with a specific verb+resource+scope: 'A FigJam code block with syntax highlighting.' The 'Editors: FigJam only' line distinguishes it from the general text/shape creation siblings, though it never names figma_create_text as the alternative for design files.

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?

Gives concrete guidance on the language argument (default plaintext, unknown values refused, 'ask for plaintext yourself'), but says nothing about when to choose this over figma_create_text or figma_create_stickies, nor any prerequisite about needing a FigJam file open.

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

Deploy Server

Other Tools