Skip to main content
Glama

Replace a registered image

replace_image

Replace an existing image by swapping in a new URL or regenerating it with AI using a prompt and style. Specify the image key to target.

Instructions

Replace the image at key either by: - url: synchronous URL swap (0 credits), or - regenerate: true + prompt: AI regeneration (~40 credits, returns a Job — poll get_job). Exactly one mode must be supplied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesImage key to replace, e.g. 'hero.background'.
urlNoNew direct URL. Mutually exclusive with regenerate.
styleNoVisual style for AI regeneration, e.g. 'photorealistic'.
promptNoSubject / scene description for AI regeneration.
regenerateNoIf true, regenerate the image with AI; requires `prompt`.
aspect_ratioNoAspect ratio for AI regeneration. Defaults to 16:9.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that URL swap is synchronous with 0 credits, while regeneration is async, costs ~40 credits, and returns a Job. This is valuable context. However, it does not mention that the replacement is irreversible or what happens to the original image, which would be important for an agent to know.

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 tightly written: two sentences with a clear bulleted list. Every clause serves a purpose—mode, cost, sync/async, job polling, and the exclusivity constraint. There is no redundant or filler content, and it is front-loaded with the primary action.

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 tool with two modes, six parameters, and no output schema, the description covers most essentials: mode selection, costs, async behavior, and job polling. It lacks a mention of the return value for the synchronous URL swap path and does not explicitly state that the replacement overwrites the existing image. These gaps prevent a perfect score.

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?

The input schema already describes all six parameters (100% coverage), so the baseline is 3. The description adds semantic value by clarifying that url and regenerate are mutually exclusive, that regenerate requires a prompt, and that style and aspect_ratio are tied to AI regeneration. It also explains the credit implications, which the schema does not.

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 replaces an image at a given key, listing two specific modes: URL swap and AI regeneration. It distinguishes itself from sibling tools like register_image and delete_image by focusing on replacement behavior. The verb 'replace' is specific and matches the tool name.

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 usage context by detailing the two modes, their prerequisites, credit costs, and the need to poll get_job for async regeneration. It states 'Exactly one mode must be supplied,' which is a clear constraint. However, it does not explicitly contrast with sibling tools like generate_image or register_image, so the differentiation is implicit rather than explicit.

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/vbalagovic/neuraldraft-mcp'

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