Skip to main content
Glama

Create a code block (FigJam)

figma_create_code_block
Idempotent

Create a syntax-highlighted code block in FigJam to document source snippets, specify the language, and position it on the page or inside a frame.

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

TableJSON 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.
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. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

Annotations cover the safety profile (destructiveHint=false, idempotentHint=true), and the description adds behavior beyond that: unrecognized language values are refused rather than silently falling back to plaintext, styling is fixed by FigJam, and environment support is 'unverified'. The idempotency-key retry semantics live in the schema, so the description is right not to repeat them.

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?

It is compact and front-loaded with the resource and the most important parameter (language), and the refusal rule and styling constraints follow. The telegraphic fragments and the trailing 'Editors: FigJam only, unverified' are slightly cryptic, but nothing is wasted.

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 an 8-parameter creation tool with only one required param, full schema coverage and matching annotations, the description supplies the environment scope, the language semantics and the styling limits an agent needs. No output schema exists, but the return value is a created node and the annotations plus idempotency key cover the risky parts.

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 a 3 is the baseline. The description adds genuine meaning on top of the schema: language matching is case-insensitive, plaintext is the default, and 'dart is in the Plugin API but not yet confirmed on the canvas' gives a caveat the schema does not. That pushes it above baseline.

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?

The name and title establish the verb+resource ('create a code block'), and the description pins it to FigJam with syntax highlighting, which distinguishes it from generic siblings like figma_create_text, figma_create_table and figma_create_stickies. The description itself opens with a noun phrase rather than a verb, so it leans on the name/title for the action.

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?

It gives concrete usage constraints: FigJam-only environment ('Editors: FigJam only, unverified') and 'no theme, font or size to set', which steers the agent away from trying to set styling. It also states the language default and refusal behavior. It does not name an alternative tool, but for a creation tool the environment constraint is the key guidance.

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