Skip to main content
Glama

Create image from shapes

create_image_from_shapes

Create an image from shapes you compose yourself, without a template. Use this when no template fits, or the user wants a one-off design: a banner, a label, an invoice. Set the canvas size in canvas, then pass shapes in draw order: the first shape is at the back, the last on top. Every shape has type, x, y, width and height, in pixels from the top left of the canvas. Types and their required field: text (text), image (src), qrcode (qrcode), barcode (barcode), icon (icon, an Iconoir name such as check-circle), table (columns and rows). frame and star need no extra field. Set colours, borders, padding and fonts in style, using CSS property names.

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": {
      "shapes": "<shapes>"
    },
    "name": "create_image_from_shapes"
  }
}

Input Schema

NameRequiredDescriptionDefault
canvasNo
formatNoDefaults to png.
shapesYesThe shapes to draw, in draw order: the first is at the back, the last on top.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses draw order, coordinate origin, type-specific required fields, and that invalid Iconoir names fail generation. It does not explain what the tool returns or whether generated images are persisted, which leaves a notable behavioral gap.

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?

The description is front-loaded with purpose and usage before mechanics, and every clause contributes useful invocation detail. The dense enumeration of shape types is necessary for correct parameter construction rather than redundant wording.

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 complex nested tool with many shape variants and no output schema, the description covers the essential input semantics thoroughly. The main missing piece is return-value behavior, such as whether the result is a URL, file, or inline binary.

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

Parameters5/5

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

The description adds substantial meaning beyond the 67%-covered schema: it explains canvas sizing, shape draw order, pixel coordinates from the top left, and the required extra field for each shape type. That type-to-field mapping is especially valuable because the schema itself does not enforce it conditionally.

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?

The description states a specific verb and resource: 'Create an image from shapes you compose yourself, without a template.' It clearly distinguishes this from template-based image creation and gives use cases such as banners, labels, and invoices.

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?

It explicitly says when to use it: 'when no template fits, or the user wants a one-off design.' The alternative is implied through the repeated contrast with templates, but no sibling tool is named and there is no explicit when-not guidance.

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.