Skip to main content
Glama

set_shape_style

Set a shape group's fill and stroke styling in one call, automatically adding missing Fill or Stroke. Accepts hex or RGB colors, opacity, stroke width, and dash patterns, then returns the applied values.

Instructions

Style a shape group's fill and/or stroke in one call — Fill/Stroke are found or ADDED as needed. Colors accept a hex string ("#rrggbb"/"#rgb") or an [r,g,b] array (0–1 or 0–255, auto-normalized). group targets a shape group by name or 1-based index (default: first group). Optional fillOpacity/strokeOpacity (0–100), strokeWidth, and dash (array of numbers or [dash,gap] pairs; up to 3 pairs). Returns the read-back fill/stroke/width.

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": {
      "layer": "<layer>"
    },
    "name": "set_shape_style"
  }
}

Input Schema

NameRequiredDescriptionDefault
compNoComp: name (string), or { id: N } for duplicate-name-safe stable-id addressing. Defaults to active comp.
dashNoDash pattern: numbers or [dash,gap] pairs.
fillNoHex or [r,g,b(,a)].
groupNoShape group name or 1-based index. Default first group.
layerYesLayer: name (string), 1-based index (integer), or { id: N } for duplicate-name-safe stable-id addressing.
strokeNoHex or [r,g,b(,a)].
instanceNoTarget a specific AE when more than one is connected (e.g. "2026", "2025", or a major like "26"). Omit when only one AE is open — see list_instances.
fillOpacityNo
strokeWidthNo
strokeOpacityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the mutation side effect that Fill/Stroke properties are ADDED if missing, explains color normalization behavior (0–1 vs 0–255), and states what is returned (read-back fill/stroke/width). It omits error behavior when the group is not found and whether omitted properties are left untouched.

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?

Dense but front-loaded: the core action comes first, followed by color/group/default details. Every clause conveys something usable, though the em-dash chaining makes it a single heavy block rather than scannable segments.

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?

For a 10-parameter mutation tool with no annotations and no output schema, the definition covers the action, defaults, color formats, and return value. Only secondary gaps remain, such as failure modes and interaction with existing fill/stroke values.

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

Parameters4/5

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

Schema coverage is 70%, and the description adds real meaning beyond it: hex format examples, the auto-normalization of 0–1 versus 0–255 arrays, the 'up to 3 pairs' limit on dash patterns, opacity ranges, and group addressing by name or 1-based index. The comp, layer, and instance parameters are only covered by the schema, not the description.

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 and resource: styling a shape group's fill and/or stroke in a single call. The 'shape group' scoping clearly separates it from text-styling siblings like set_text_style, though it never explicitly names an alternative tool.

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?

It gives operational context (Fill/Stroke are found or added as needed, group defaults to the first group), which implies when the tool applies. However, there is no explicit when-to-use versus when-not guidance, no mention of alternatives such as add_shape or set_path, and no prerequisites stated.

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

Deploy Server

Other Tools