Skip to main content
Glama

get_code_connect_map

Retrieve mappings from Figma component instances to code components for a node, including unmapped components, to connect design elements with their code implementations.

Instructions

Get the mapping from the component instances in a node to code components: { nodeId: { codeConnectName, codeConnectSrc, label } }, plus the components that are not mapped yet. Mappings live in the project (.figma-local/code-connect.json under the working directory).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoThe ID of the node, eg. "123:456" or "123-456" (instance ids like "I1:2;3:4" work too). Omit it to use the current selection in Figma.
fileKeyNoThe key of the Figma file. Accepted for compatibility; the file open in Figma Desktop is always used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.1

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add genuine context: it composes the response into mapped vs unmapped components and discloses where the data lives (.figma-local/code-connect.json under the working directory), which implies a local read. It does not discuss permissions needed to read the file or whether it can fail.

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?

The content is packed into essentially one compound sentence with the return shape front-loaded and no filler. It is dense but not padded, and every clause earns its place.

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?

There is no output schema, so the description usefully explains the return value itself (the nodeId-keyed mapping and the unmapped components). The remaining gap is usage context relative to the add/remove siblings, but for a read tool with a 100%-covered schema and full return description it is largely complete.

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%, so the schema already documents both parameters (including that nodeId can be omitted to use the current selection, and that fileKey is accepted only for compatibility). The description mentions operating on 'a node' but adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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 names a specific verb (Get) and resource (the code-connect map), and details what is returned: a nodeId-to-code-component mapping plus the components not yet mapped. It is clearly distinguishable from add_code_connect_map and remove_code_connect_map by name and semantics, though it never explicitly names those siblings.

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?

There is no statement of when to use this tool versus alternatives like add_code_connect_map, remove_code_connect_map, or the other read tools. The read-only intent is only implied by the word 'Get'. An agent gets no explicit routing guidance.

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