Skip to main content
Glama

replace_background

Replace an image's background with a new scene described in text. Provide a local image path and a prompt describing the desired background to get the path to the updated image.

Instructions

Replace the background of an image following a text description (fal). Requires a fal API key. Returns the path to the new image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNofal model id. Omit for the default.
promptYesWhat the new background should look like
image_pathYesLocal path to the source image

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 burden. It does disclose that a fal API key is required and that the tool returns the path to the new image. However, it does not mention whether the original image is modified, potential costs, rate limits, or other operational side effects, leaving significant behavioral gaps.

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 three short sentences, each earning its place: purpose, prerequisite, and output. It is front-loaded with the main action and contains no filler or redundant wording.

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?

While the description covers the core purpose, prerequisite, and return value, it omits important operational context for an agent, such as whether the fal API key can be set via sibling tools like set_provider_key, or whether the operation is synchronous and costly. With no annotations or output schema, more completeness would be expected.

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 100%, so the schema already fully documents all three parameters. The description adds no new semantic meaning beyond what the schema provides, so the baseline of 3 applies.

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 ('Replace'), resource ('background of an image'), and condition ('following a text description'), making it distinct from siblings like remove_background. The parenthetical '(fal)' clarifies the service. This is a clear and specific purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives such as remove_background or edit_image. It only mentions a prerequisite (fal API key) but does not explain when to prefer this tool over others or when not to use it.

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