Skip to main content
Glama

Set design element width

set_design_element_width
DestructiveIdempotent

Set the width of one element in an existing design, in design pixels; text re-wraps to the new width. Pass "auto" to shrink a text element to fit its text on one line, for example so a button panel fits its label. The change is saved to the design. The response has the updated design structure (element aliases and positions) and a rendered preview.

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": {
      "workspace_key": "<workspace_key>",
      "design_id": "<design_id>",
      "element": "<element>",
      "width": "<width>"
    },
    "name": "set_design_element_width"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthYesWidth in design pixels (e.g. "840"), or "auto".
elementYesThe element to change: its alias from the design structure ("text-1", "image-1", "bg", "logo", or slide-scoped "s2-text-1"), or its raw id ("shape:...").
design_idYesThe design id (from compose_design or generate_post) or the key from a /designs/<key> URL.
workspace_keyYesKey of the workspace to act in. Call list_workspaces to see the workspaces you have access to and their keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the bar is lower. The description adds the non-obvious behaviors: text re-wraps, the change is persisted, and the response includes structure plus a rendered preview. It does not warn that resizing is destructive (layout shifts / clipped content), which is the one annotation-relevant fact left implicit.

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?

Front-loaded with the core action, then the 'auto' special case, then persistence and return shape. Every sentence carries content; only the awkward line break inside the sentence is a minor blemish.

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?

No output schema exists, and the description covers the return value (updated structure with aliases/positions plus a preview), which is the main missing piece. The only gap is not flagging the destructive consequence of the change despite destructiveHint=true.

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 100%, so baseline would be 3. The description goes beyond it by explaining the semantic of the special 'auto' value (shrink a text element to fit its text on one line) rather than just repeating the schema's shorthand.

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?

Specific verb + resource + unit ('set the width ... in design pixels'), and clearly distinct from siblings like set_design_font_size or move_design_element. An agent can select it without opening the schema.

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?

Gives a concrete condition for the 'auto' mode with a motivating example ('so a button panel fits its label'), which is real usage guidance. It stops short of stating when to prefer this over move_design_element or set_design_text_panel, but the tool's scope is narrow enough that little inference is required.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.