Skip to main content
Glama

code_mapping

Read or update the Figma-to-code component mapping stored in .layerwright/mapping.json, then commit it to share with your team.

Instructions

Read or upsert the Figma component → code component mapping stored in .layerwright/mapping.json (commit it to share with the team).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
mappingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses the storage path and that committing shares with the team, but says nothing about whether 'set' merges or overwrites existing mappings, auth/permission needs, or failure behavior.

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?

A single front-loaded sentence with the core purpose first and a useful parenthetical tip at the end. No wasted words.

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?

For a two-parameter read/write tool with no annotations, no output schema, and 0% schema description coverage, the description is too thin. An agent cannot infer the mappings payload shape, return format, or merge semantics from it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for both parameters. It only implies the get/set action via 'read or upsert' and adds nothing about the mappings array structure (figmaComponent, codeComponent, importPath, props, variants), leaving most semantics undocumented.

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?

States a specific verb pair (read/upsert) and a concrete resource (the Figma→code component mapping) plus its storage location in .layerwright/mapping.json. Clear enough to distinguish from most siblings, though it does not explicitly contrast with code_scan_components or layerwright_memory.

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 gives no guidance on when to use this tool versus siblings like code_scan_components or code_verify_usage, nor on choosing between the get and set actions. The parenthetical about committing is a workflow tip, not selection guidance.

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