Skip to main content
Glama

Get Code Connect Mapping

get_code_connect_map
Read-only

Map Figma component instances to code components and list any unmapped ones, using the open file's project mappings.

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

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.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds useful context beyond them: where mappings are persisted (.figma-local/code-connect.json under the working directory) and the exact return shape. It stops short of describing behavior when no mapping exists.

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-loaded with the verb and result, then the storage location. The inline object shape is dense but informative; nothing is wasted, though the second sentence could be tighter.

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?

With no output schema, the description compensates by outlining the returned map structure and the 'not mapped yet' list, plus the storage location. It is nearly complete for a read tool; only edge-case behavior (empty results, missing file) is unstated.

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 description coverage is 100%, so both parameters (nodeId, fileKey, including the fileKey compatibility caveat) are already fully documented in the schema. The description adds nothing about parameter meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get the mapping from the component instances in a node to code components') and even spells out the returned shape. It is clearly distinguished from its add_code_connect_map/remove_code_connect_map siblings by naming the exact resource.

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?

Usage is only implied: mentioning that it also returns 'the components that are not mapped yet' hints at the discovery use case, but there is no explicit when-to-use or when-not-to-use guidance, nor a pointer to add_code_connect_map for creating mappings.

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