Skip to main content
Glama
grab

Talk to Figma MCP

by grab

get_selection

Retrieve details about the currently selected elements in Figma, enabling users to analyze or modify designs programmatically through natural language commands.

Instructions

Get information about the current selection in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • This is the registration and handler implementation for the MCP tool named 'get_selection'. It defines the tool with an empty input schema, and the handler sends a 'get_selection' command to the underlying Figma plugin via WebSocket (using sendCommandToFigma) and returns the result as a text content block containing the JSON-stringified response.
    server.tool(
      "get_selection",
      "Get information about the current selection in Figma",
      {},
      async () => {
        try {
          const result = await sendCommandToFigma("get_selection");
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(result)
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error getting selection: ${error instanceof Error ? error.message : String(error)
                  }`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get information'), but doesn't describe what information is returned, format, error conditions, or whether it requires specific permissions. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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, efficient sentence that states the core purpose without unnecessary words. It's front-loaded with the essential information and contains zero wasted content. This is an excellent example of conciseness for a simple tool.

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

Completeness2/5

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

Given the absence of annotations and output schema, the description is insufficiently complete. It doesn't explain what information is returned about the selection, format, or error handling. For a tool that presumably returns structured data about Figma selections, more context about the return value would be helpful despite the lack of output schema.

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 tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description adds no parameter information, which is appropriate since none are needed. The baseline for 0 parameters is 4, as the description doesn't need to compensate for any schema gaps.

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 ('Get information') and target resource ('current selection in Figma'), making the purpose immediately understandable. It distinguishes from siblings like get_node_info or get_document_info by focusing specifically on the current selection rather than general nodes or documents. However, it doesn't specify what type of information is retrieved, leaving some ambiguity.

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?

The description provides no guidance on when to use this tool versus alternatives like get_node_info or get_document_info. It doesn't mention prerequisites (e.g., whether a selection must exist), nor does it explain what happens if there's no current selection. The agent must infer usage from the tool name alone.

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

Related 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/grab/cursor-talk-to-figma-mcp'

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