Skip to main content
Glama

expand_canvas

Add pixels to an image's top, bottom, left, or right edges, then fill the new borders with classic fill or AI generative content from a prompt.

Instructions

Generative expand: add px on each side and fill the new borders (a new top layer masked to them). No prompt = classic fill (fine for sky, walls, plain backgrounds); with prompt or an AI service = generative.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
leftNo
seedNo
rightNo
bottomNo
promptNo
backendNoauto
projectNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose one important structural side effect: the fill lands on 'a new top layer masked to them,' so the agent knows the layer stack changes. It says nothing about permissions, cost/latency of the generative path, reversibility, or failure modes.

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?

Two tight sentences, front-loaded with the action and mechanism, then the mode switch. Parentheticals are dense but each clause carries information; no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no annotations and no output schema, the description covers the core behavior and the prompt-mode decision but leaves backend/seed/project and any return-value expectations unaddressed. Adequate but with clear gaps given the complexity.

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

Parameters3/5

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

Schema description coverage is 0% across 8 parameters, so the description must compensate and only partly does. It explains the semantic split for prompt vs. no-prompt and implies the four side parameters, but seed, backend, and project are left entirely undocumented.

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 (expand) plus resource (canvas) and clarifies the mechanism: pixel padding on each side filled with generated content on a new masked top layer. It is distinguishable from resize_canvas and crop_canvas by implication, though it never names those siblings.

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 explains the two operating modes well ('No prompt = classic fill (fine for sky, walls, plain backgrounds); with prompt or an AI service = generative'), which is real guidance for choosing behavior. However, it gives no guidance on when to pick expand_canvas over the neighboring resize_canvas/crop_canvas tools, nor any prerequisites.

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