Skip to main content
Glama

Add shape

add_shape

Add a rectangle, rounded rectangle (rounded_rect) or circle to a page, for a band, a card, a pill label or a colour block behind text. x,y are the TOP-LEFT of the shape’s box for every shape, a circle included, and the returned element reports the same top-left plus its real width and height. A circle is size wide and tall; a rectangle takes width and height separately (or size for a square). cornerRadius rounds a rectangle (px), opacity is 0 to 1, stroke/strokeWidth draw an outline. Shapes stack above what is already on the page: use reorder_element to put one behind text. Owner-scoped, paid plans. Next: add_text on top, or reorder_element.

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": {
      "projectId": "<projectId>",
      "pageId": "<pageId>",
      "shape": "<shape>"
    },
    "name": "add_shape"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
fillNo
sizeNo
shapeYes
widthNo
heightNo
pageIdYes
strokeNo
opacityNo
projectIdYes
strokeWidthNo
cornerRadiusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say it is a non-destructive write): it discloses default z-order stacking behavior, the owner-scoped and paid-plan gating, and what the returned element reports (same top-left plus real width and height). These are exactly the traits an agent cannot infer from the schema or hints.

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 action and the shape set, then geometry semantics, then styling, stacking, and access constraints, so every clause earns its place. Some sentences are run-on (the x,y/return sentence packs three facts), but nothing is redundant filler.

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?

Covers the difficult semantics of a 13-parameter geometry tool and partially describes the return value despite there being no output schema. Minor gaps remain: no colour/fill format and no statement of what identifier comes back for the new element.

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?

With 0% schema description coverage the description must carry the load, and it does for the hard parts: x,y are the TOP-LEFT box origin for every shape including circles, size drives a circle or a square, width/height drive a rectangle, cornerRadius is px, opacity is 0-1, stroke/strokeWidth draw an outline. It leaves fill (colour format) and projectId/pageId undocumented, so it is not fully compensating.

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?

States a specific verb (Add) and the exact resource set (rectangle, rounded_rect, circle) plus the page scope, and enumerates concrete use cases (band, card, pill label, colour block behind text). This is clearly distinguishable from add_text and add_image among the siblings.

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?

Explicitly routes the agent: shapes stack above existing content, so use reorder_element to place one behind text, and 'Next: add_text on top, or reorder_element' names the follow-on tools. No explicit when-not-to-use clause, which keeps it short of a 5.

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.