Skip to main content
Glama

icon_map

Read-only

Map Figma icons to existing project SVG files for reuse, including color contract and import hints, to avoid duplicate exports.

Instructions

Map the Figma icon nodes in a selection/subtree to the project's existing .svg files, so codegen reuses the designer-curated asset instead of re-exporting a duplicate. Joins the grounded Figma icon names against the repo svg files (gitignore-aware scan), name-based and near-exact (a wrong icon is a silent visual bug, so unsure matches fall through to a fresh export rather than mis-reuse). Each match reports the file path, the color contract read from the file (currentColor / fixed / multi-color), and how to recolor it in this project (currentColor → text-{token}, gated on the svg mode since currentColor dies through an ). It does not fabricate the import line — compose it from the file path and profile.svg (importHint gives the loader form: svgr ?react / vite-svg-loader ?component / { ReactComponent } / url <img>), mirroring the project's existing imports for the alias/relative path. Unmatched icons are returned in unmapped; iconLibraries lists any installed icon component library (lucide / heroicons / iconify) as the alternative to a fresh export. rootDir defaults to the server cwd. Returns { mappings, unmapped, iconLibraries, profile }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoRoot node id; omit to use the selection or current page
rootDirNoProject root to scan; defaults to the server cwd
thresholdNoConfidence at/above which a match counts as a reliable reuse (default 0.7)
Behavior5/5

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

The description discloses extensive behavioral details beyond the readOnlyHint annotation: gitignore-aware scanning, name-based and near-exact matching, fallthrough on uncertainty, color contract extraction (currentColor/fixed/multi-color), recolor guidance, importHint variants, and the fact that it does not fabricate import lines. This far exceeds the annotation's minimal information.

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 description is concise relative to the tool's complexity, with every sentence adding value (matching behavior, import hints, return shape). It is front-loaded with the core purpose. However, a long single paragraph is slightly dense; bullet points could improve scannability, but it is still well within acceptable length.

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

Completeness5/5

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

Despite no output schema, the description clearly states the return shape: 'Returns { mappings, unmapped, iconLibraries, profile }' and explains what each part contains (file path, color contract, recolor info, importHint forms). It also covers failure handling, defaults, and integration with project imports. This is a complete, self-contained description for a complex tool.

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% for all three parameters, so the schema already documents their meanings and defaults (e.g., rootDir defaults to cwd, threshold default 0.7). The description adds context about matching thresholds indirectly but does not provide additional parameter-specific syntax or edge-case details beyond the schema. Baseline 3 is appropriate.

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?

The description clearly specifies the tool's function: 'Map the Figma icon nodes in a selection/subtree to the project's existing `.svg` files'. It also explains the goal 'so codegen reuses the designer-curated asset instead of re-exporting a duplicate', which distinguishes it from sibling mapping tools like token_map and component_map.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool (during codegen to reuse existing SVG assets) and describes fallback behavior ('unsure matches fall through to a fresh export'). It does not explicitly state when not to use it or name alternative tools, but the 'iconLibraries' mention and distinct purpose imply alternatives. The lack of explicit exclusions prevents a 5.

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/awdr74100/figwright'

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