Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

join_channel

Open a named channel to begin direct communication with Figma, enabling AI-assisted design actions through natural language commands.

Instructions

Join a specific channel to communicate with Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYesThe name of the channel to join

Implementation Reference

  • Registration of the 'join_channel' tool on the MCP server, defining its schema (channel string) and handler callback.
    // Join Channel Tool
    server.tool(
      "join_channel",
      "Join a specific channel to communicate with Figma",
      {
        channel: z.string().describe("The name of the channel to join"),
      },
      async ({ channel }) => {
        try {
          if (!channel) {
            // If no channel provided, ask the user for input
            return {
              content: [
                {
                  type: "text",
                  text: "Please provide a channel name to join:",
                },
              ],
              followUp: {
                tool: "join_channel",
                description: "Join the specified channel",
              },
            };
          }
    
          // Use joinChannel instead of sendCommandToFigma to ensure currentChannel is updated
          await joinChannel(channel);
    
          return {
            content: [
              {
                type: "text",
                text: `Successfully joined channel: ${channel}`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error joining channel: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );
  • The joinChannel function that sends 'join' command via WebSocket to Figma, updates currentChannel, and verifies with a ping.
    export async function joinChannel(channelName: string): Promise<void> {
      if (!ws || ws.readyState !== WebSocket.OPEN) {
        throw new Error("Not connected to Figma");
      }
    
      try {
        await sendCommandToFigma("join", { channel: channelName });
        currentChannel = channelName;
    
        try {
          await sendCommandToFigma("ping", {}, 12000);
          logger.info(`Joined channel: ${channelName}`);
        } catch (verificationError) {
          currentChannel = null;
          const errorMsg = verificationError instanceof Error
            ? verificationError.message
            : String(verificationError);
          logger.error(`Failed to verify channel ${channelName}: ${errorMsg}`);
          throw new Error(`Failed to verify connection to channel "${channelName}". The Figma plugin may not be connected to this channel.`);
        }
      } catch (error) {
        logger.error(`Failed to join channel: ${error instanceof Error ? error.message : String(error)}`);
        throw error;
      }
  • Input schema for the join_channel tool: requires a 'channel' string parameter.
    {
      channel: z.string().describe("The name of the channel to join"),
  • Import of the joinChannel helper function from the websocket utility.
    import { sendCommandToFigma, joinChannel } from "../utils/websocket.js";
Behavior2/5

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

No annotations are provided, and the description only hints at communication but does not disclose behavioral traits such as whether joining is ephemeral, creates a subscription, requires authentication, or has side effects. The agent is left uninformed about the tool's 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 a single sentence that concisely conveys the tool's purpose without unnecessary words. It is efficiently front-loaded.

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

Completeness3/5

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

Given the tool's simplicity (one parameter, no output schema), the description is minimally adequate. However, the lack of behavioral transparency and usage guidance leaves it incomplete for an agent to use confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a clear description of the 'channel' parameter. The tool description adds no additional meaning beyond the schema, so a baseline score of 3 is appropriate.

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 description clearly states the action (join) and the resource (a channel) and the purpose (to communicate with Figma). It is specific and distinguishes from sibling tools, none of which involve joining.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives, nor any prerequisites or contextual cues. The agent has no direction on when to invoke this tool.

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/arinspunk/claude-talk-to-figma-mcp'

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