Skip to main content
Glama

Fill Selection

photopea_fill_selection

Applies a solid color fill to the active selection on the current layer. Requires an existing selection — create one with make_selection. Supports custom hex color, opacity, and blend mode. Modifies pixel data directly.

Instructions

Fill the current selection with a solid color on the active layer. Requires an active selection — use make_selection to create one first. Modifies pixel data on the active layer directly. Use clear_selection afterward to deselect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorYesColor as hex string (e.g. #ff0000)
opacityNoFill opacity percentage (0 = fully transparent, 100 = fully opaque, default 100)
blendModeNoBlend mode for the fill (e.g. normal, multiply, screen, overlay, darken, lighten). Defaults to normal.
Behavior5/5

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

The description clearly states that the tool modifies pixel data directly on the active layer. This aligns with readOnlyHint=false, and though destructiveHint=false, the description does not claim otherwise, so there is no contradiction.

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 concise with three sentences, front-loading the primary action and providing essential context without unnecessary details.

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?

The description covers prerequisites, actions, and follow-up. However, it lacks details on return values, error handling (e.g., no selection), and undoability. Given no output schema, minor gaps exist.

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 coverage is 100%, so the description adds minimal value beyond the schema's parameter descriptions. The description does not provide additional context for opacity or blendMode beyond what is already in the schema.

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 clearly states the tool fills the current selection with a solid color on the active layer. It uses specific verbs and resources, and differentiates from sibling tools like photopea_add_fill_layer by emphasizing the need for an active selection.

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?

The description provides explicit guidance on prerequisites (active selection, use make_selection) and post-actions (clear_selection). It does not explicitly exclude alternatives but gives clear context for when to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/attalla1/photopea-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server