Skip to main content
Glama

add_legend

Add a color legend to a Figma frame to label chart or data series. Specify the frame and legend items to clarify visual mappings.

Instructions

Add a color legend.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "frameId": "<frameId>",
      "items": "<items>"
    },
    "name": "add_legend"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
frameIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing. 'Add' implies a mutation that creates a node, but nothing is said about permissions, side effects on the target frame, or where the legend is placed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four words is concise but amounts to under-specification rather than efficiency. There is no wasted sentence, but there is also no information beyond the title-level statement.

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?

With two required, undocumented parameters, no annotations, and no output schema, a four-word description is far short of what an agent needs to invoke this correctly. At minimum the frameId target and the items element shape should be described.

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

Parameters1/5

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

Schema description coverage is 0% for both required parameters, and the description mentions neither. The agent gets no hint that frameId targets the container or that items supplies the color/label entries, which is the single most important ambiguity here.

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

Purpose3/5

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

'Add a color legend' names a specific verb and resource, so the basic operation is identifiable and parallels siblings like add_chart and add_text. However, it never says what the legend is attached to (a frame) or what it visualizes, so scope is only implied.

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?

No guidance on when to use this versus add_chart or add_text, and no prerequisites or exclusions. The agent must infer usage entirely from the name and sibling set.

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