Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_get_code_connect_map

Retrieve the local Code Connect mapping for a Figma node or its main component from shared plugin data, so you can inspect node-to-code mappings without cloud sync.

Instructions

Local Code Connect mapping stored on a node (and on its main component for instances). Stored in this file's shared plugin data; not synced with Figma's cloud Code Connect.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "figma_get_code_connect_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdNo
fileKeyNoWhich connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the behavioral burden. It usefully discloses the data source (this file's shared plugin data), the instance-to-main-component fallback, and that cloud sync does not apply, but it says nothing about what happens when no mapping exists, permissions needed, or the shape of the returned mapping.

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?

Two short sentences, the resource is front-loaded, and the cloud-sync caveat follows immediately. Every clause carries information; nothing is padding.

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?

For a simple two-parameter read tool with no output schema and no annotations, the definition covers data provenance and scope adequately, but leaves the return value and the no-mapping case undocumented, which is a real gap an agent will hit.

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 only 50%: fileKey is documented in the schema, while nodeId carries only a regex pattern. The description partially compensates by explaining that a node's mapping is read (and its main component's for instances), but it adds no detail on the nodeId format or the fileKey resolution.

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 resource — the local Code Connect mapping stored on a node, including the main-component fallback for instances — so an agent can tell it apart from a cloud/server-side Code Connect lookup. It never states a verb like 'retrieve', but the noun phrase is unambiguous about what is returned.

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 explicit when-to-use guidance and no mention of alternatives such as figma_add_code_connect_map or figma_get_design_context. The 'not synced with Figma's cloud Code Connect' note is a scoping caveat rather than a routing rule, leaving the agent to infer when this tool applies.

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